Executive summary
The system holds an adequate standing with a health score of 58%, indicating a workable asset that carries real operational risk. While the codebase is medium-sized and relatively inexpensive to rebuild, its current state imposes a hidden tax on every change, slowing delivery and increasing defect risk. The primary concern is not the code’s complexity alone, but the lack of operational safeguards that leave the business exposed to preventable outages and security regressions.
The most significant risk lies in production readiness, which scores poorly at 53%. This lens measures whether the system is safe to operate, tested, and observable. A low score here means that changes are more likely to cause outages or go undetected until they impact users. For a system of this size, the cost of fixing readiness issues is low, but the cost of ignoring them is high in terms of incident response and lost trust. The weakest point is the lack of automated, repeatable release processes, which makes deployments fragile and error-prone.
A second theme is the velocity tax imposed by code quality. While the architecture is decent, the code’s complexity and duplication create a drag on development speed. Every modification in these weaker areas costs roughly 5–11% more effort than it should, compounding over time. This is not just a technical debt issue; it is a direct hit to team productivity and time-to-market. The cost of this drag is paid annually in engineer hours, making it a recurring expense that reduces the team’s capacity for new features.
On the positive side, the system is not fragile. The rebuild effort is modest, estimated at less than half a person-year, suggesting the core logic is sound and not entangled in unmanageable complexity. The codebase is also free of boilerplate, indicating that the existing code is purposeful and likely well-understood by the current team. This provides a stable foundation for improvement without requiring a costly rewrite.
The first action must be to add static security analysis to the continuous integration pipeline. This single step pays for itself quickly by preventing security regressions from reaching production. It is a low-effort, high-impact change that addresses the most critical gap in readiness. Following this, the team should automate the release process to ensure deployments are repeatable and reversible. These steps will immediately reduce operational risk and improve delivery confidence, allowing the team to focus on reducing the velocity tax in subsequent phases.
Raise Readiness 53 → 70 (the Healthy floor) ⇒ headline 58 → ~63.
New since the last scan (5+)
Rebuild cost & value ~ Modeled — €21,000–€110,000
| Cost to rebuild | €21,000–€110,000 |
|---|---|
| Domain complexity | Standard |
| Quality factor | 0.8× (at 58% quality) |
| Size & shape | Medium · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk) |
This codebase represents roughly ~0.4 person-years of build effort (about ~€64,000 to rebuild). Its weakest lens is Readiness at 53% — the part of that asset most exposed by the findings below.
Top priorities
Diagnosis — what's actually going on
Architecture — module dependency graph
Architecture — module dependency matrix
| depends on → | 1 transformers-structured-output.src.engine.constraint | 2 transformers-structured-output.src.engine.types | 3 transformers.src.feature_extraction_utils | 4 transformers.src.image_processors_utils | 5 transformers.src.models.modeling_outputs | 6 transformers.src.models.modeling_utils | 7 transformers.src.processing_utils | 8 transformers.src.tokenization_utils | 9 transformers.src.utils.tensor | 10 transformers-structured-output.src.StructuredOutputProcessor | 11 transformers-structured-output.src.engine | 12 transformers.src.models.clip.modeling_clip | 13 transformers.src.models.dac.modeling_dac | 14 transformers.src.models.detr.modeling_detr | 15 transformers.src.models.donut.image_processing_donut | 16 transformers.src.models.encodec.feature_extraction_encodec | 17 transformers.src.models.gemma3n.feature_extraction_gemma3n | 18 transformers.src.models.gemma3n.modeling_gemma3n | 19 transformers.src.models.hubert.modeling_hubert | 20 transformers.src.models.llava.modeling_llava | 21 transformers.src.models.maskformer.image_processing_maskformer | 22 transformers.src.models.mbart.tokenization_mbart | 23 transformers.src.models.mgp_str.modeling_mgp_str | 24 transformers.src.models.mimi.modeling_mimi | 25 transformers.src.models.owlvit.image_processing_owlvit | 26 transformers.src.models.parakeet.feature_extraction_parakeet | 27 transformers.src.models.qwen2_vl.image_processing_qwen2_vl | 28 transformers.src.models.qwen2_vl.modeling_qwen2_vl | 29 transformers.src.models.qwen2_vl.processing_qwen2_vl | 30 transformers.src.models.rt_detr.modeling_rt_detr | 31 transformers.src.models.ultravox.modeling_ultravox | 32 transformers.src.models.dac.feature_extraction_dac | 33 transformers.src.models.gemma3.modeling_gemma3 | 34 transformers.src.models.idefics3.modeling_idefics3 | 35 transformers.src.models.qwen2_5_vl.modeling_qwen2_5_vl | 36 transformers.src.models.qwen2_5_vl.processing_qwen2_5_vl | 37 transformers.src.models.rf_detr.modeling_rf_detr | 38 transformers.src.models.rt_detr_v2.modeling_rt_detr_v2 | 39 transformers.src.models.qwen3_vl.modeling_qwen3_vl | 40 transformers.src.models.qwen3_5.modeling_qwen3_5 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 transformers-structured-output.src.engine.constraint | ||||||||||||||||||||||||||||||||||||||||
| 2 transformers-structured-output.src.engine.types | ||||||||||||||||||||||||||||||||||||||||
| 3 transformers.src.feature_extraction_utils | ||||||||||||||||||||||||||||||||||||||||
| 4 transformers.src.image_processors_utils | ||||||||||||||||||||||||||||||||||||||||
| 5 transformers.src.models.modeling_outputs | ||||||||||||||||||||||||||||||||||||||||
| 6 transformers.src.models.modeling_utils | ||||||||||||||||||||||||||||||||||||||||
| 7 transformers.src.processing_utils | ||||||||||||||||||||||||||||||||||||||||
| 8 transformers.src.tokenization_utils | ||||||||||||||||||||||||||||||||||||||||
| 9 transformers.src.utils.tensor | ||||||||||||||||||||||||||||||||||||||||
| 10 transformers-structured-output.src.StructuredOutputProcessor | 1 | 1 | 1 | |||||||||||||||||||||||||||||||||||||
| 11 transformers-structured-output.src.engine | 1 | 6 | ||||||||||||||||||||||||||||||||||||||
| 12 transformers.src.models.clip.modeling_clip | 1 | |||||||||||||||||||||||||||||||||||||||
| 13 transformers.src.models.dac.modeling_dac | 2 | 1 | ||||||||||||||||||||||||||||||||||||||
| 14 transformers.src.models.detr.modeling_detr | 2 | 1 | ||||||||||||||||||||||||||||||||||||||
| 15 transformers.src.models.donut.image_processing_donut | 1 | |||||||||||||||||||||||||||||||||||||||
| 16 transformers.src.models.encodec.feature_extraction_encodec | 1 | |||||||||||||||||||||||||||||||||||||||
| 17 transformers.src.models.gemma3n.feature_extraction_gemma3n | 1 | |||||||||||||||||||||||||||||||||||||||
| 18 transformers.src.models.gemma3n.modeling_gemma3n | 1 | |||||||||||||||||||||||||||||||||||||||
| 19 transformers.src.models.hubert.modeling_hubert | 1 | |||||||||||||||||||||||||||||||||||||||
| 20 transformers.src.models.llava.modeling_llava | 1 | |||||||||||||||||||||||||||||||||||||||
| 21 transformers.src.models.maskformer.image_processing_maskformer | 1 | |||||||||||||||||||||||||||||||||||||||
| 22 transformers.src.models.mbart.tokenization_mbart | 1 | |||||||||||||||||||||||||||||||||||||||
| 23 transformers.src.models.mgp_str.modeling_mgp_str | 1 | 1 | ||||||||||||||||||||||||||||||||||||||
| 24 transformers.src.models.mimi.modeling_mimi | 2 | 1 | ||||||||||||||||||||||||||||||||||||||
| 25 transformers.src.models.owlvit.image_processing_owlvit | 1 | |||||||||||||||||||||||||||||||||||||||
| 26 transformers.src.models.parakeet.feature_extraction_parakeet | 1 | |||||||||||||||||||||||||||||||||||||||
| 27 transformers.src.models.qwen2_vl.image_processing_qwen2_vl | 1 | |||||||||||||||||||||||||||||||||||||||
| 28 transformers.src.models.qwen2_vl.modeling_qwen2_vl | 1 | |||||||||||||||||||||||||||||||||||||||
| 29 transformers.src.models.qwen2_vl.processing_qwen2_vl | 1 | |||||||||||||||||||||||||||||||||||||||
| 30 transformers.src.models.rt_detr.modeling_rt_detr | 1 | 1 | ||||||||||||||||||||||||||||||||||||||
| 31 transformers.src.models.ultravox.modeling_ultravox | 1 | |||||||||||||||||||||||||||||||||||||||
| 32 transformers.src.models.dac.feature_extraction_dac | 1 | |||||||||||||||||||||||||||||||||||||||
| 33 transformers.src.models.gemma3.modeling_gemma3 | 1 | 1 | ||||||||||||||||||||||||||||||||||||||
| 34 transformers.src.models.idefics3.modeling_idefics3 | 1 | |||||||||||||||||||||||||||||||||||||||
| 35 transformers.src.models.qwen2_5_vl.modeling_qwen2_5_vl | 2 | |||||||||||||||||||||||||||||||||||||||
| 36 transformers.src.models.qwen2_5_vl.processing_qwen2_5_vl | 1 | |||||||||||||||||||||||||||||||||||||||
| 37 transformers.src.models.rf_detr.modeling_rf_detr | 1 | 1 | ||||||||||||||||||||||||||||||||||||||
| 38 transformers.src.models.rt_detr_v2.modeling_rt_detr_v2 | 1 | 1 | ||||||||||||||||||||||||||||||||||||||
| 39 transformers.src.models.qwen3_vl.modeling_qwen3_vl | 2 | |||||||||||||||||||||||||||||||||||||||
| 40 transformers.src.models.qwen3_5.modeling_qwen3_5 | 1 |
10→1 transformers-structured-output.src.StructuredOutputProcessor depends on transformers-structured-output.src.engine.constraint✕
- Type pairs
- 1 distinct (type in transformers-structured-output.src.StructuredOutputProcessor → type in transformers-structured-output.src.engine.constraint) reference.
- Which types
packages.transformers-structured-output.src.StructuredOutputProcessor.StructuredOutputProcessor→packages.transformers-structured-output.src.engine.constraint.ResponseFormat
- Direction
- transformers-structured-output.src.StructuredOutputProcessor uses transformers-structured-output.src.engine.constraint. Changing transformers-structured-output.src.engine.constraint can break transformers-structured-output.src.StructuredOutputProcessor, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
10→2 transformers-structured-output.src.StructuredOutputProcessor depends on transformers-structured-output.src.engine.types✕
- Type pairs
- 1 distinct (type in transformers-structured-output.src.StructuredOutputProcessor → type in transformers-structured-output.src.engine.types) reference.
- Which types
packages.transformers-structured-output.src.StructuredOutputProcessor.StructuredOutputProcessor→packages.transformers-structured-output.src.engine.types.TokenizerSource
- Direction
- transformers-structured-output.src.StructuredOutputProcessor uses transformers-structured-output.src.engine.types. Changing transformers-structured-output.src.engine.types can break transformers-structured-output.src.StructuredOutputProcessor, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
10→9 transformers-structured-output.src.StructuredOutputProcessor depends on transformers.src.utils.tensor✕
- Type pairs
- 1 distinct (type in transformers-structured-output.src.StructuredOutputProcessor → type in transformers.src.utils.tensor) reference.
- Which types
packages.transformers-structured-output.src.StructuredOutputProcessor.ConstraintLogitsProcessor→packages.transformers.src.utils.tensor.Tensor
- Direction
- transformers-structured-output.src.StructuredOutputProcessor uses transformers.src.utils.tensor. Changing transformers.src.utils.tensor can break transformers-structured-output.src.StructuredOutputProcessor, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
11→1 transformers-structured-output.src.engine depends on transformers-structured-output.src.engine.constraint✕
- Type pairs
- 1 distinct (type in transformers-structured-output.src.engine → type in transformers-structured-output.src.engine.constraint) reference.
- Which types
packages.transformers-structured-output.src.engine.constraint→packages.transformers-structured-output.src.engine.constraint.ResponseFormat
- Direction
- transformers-structured-output.src.engine uses transformers-structured-output.src.engine.constraint. Changing transformers-structured-output.src.engine.constraint can break transformers-structured-output.src.engine, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
11→2 transformers-structured-output.src.engine depends on transformers-structured-output.src.engine.types✕
- Type pairs
- 6 distinct (type in transformers-structured-output.src.engine → type in transformers-structured-output.src.engine.types) references.
- Which types
packages.transformers-structured-output.src.engine.constraint→packages.transformers-structured-output.src.engine.types.ConstraintStatepackages.transformers-structured-output.src.engine.constraint→packages.transformers-structured-output.src.engine.types.TokenizerSourcepackages.transformers-structured-output.src.engine.json→packages.transformers-structured-output.src.engine.types.ConstraintStatepackages.transformers-structured-output.src.engine.json→packages.transformers-structured-output.src.engine.types.JSONSchemapackages.transformers-structured-output.src.engine.regex→packages.transformers-structured-output.src.engine.types.ConstraintStatepackages.transformers-structured-output.src.engine.tokenizer→packages.transformers-structured-output.src.engine.types.TokenizerSource
- Direction
- transformers-structured-output.src.engine uses transformers-structured-output.src.engine.types. Changing transformers-structured-output.src.engine.types can break transformers-structured-output.src.engine, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
12→6 transformers.src.models.clip.modeling_clip depends on transformers.src.models.modeling_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.clip.modeling_clip → type in transformers.src.models.modeling_utils) reference.
- Which types
packages.transformers.src.models.clip.modeling_clip.CLIPPreTrainedModel→packages.transformers.src.models.modeling_utils.PreTrainedModel
- Direction
- transformers.src.models.clip.modeling_clip uses transformers.src.models.modeling_utils. Changing transformers.src.models.modeling_utils can break transformers.src.models.clip.modeling_clip, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
13→5 transformers.src.models.dac.modeling_dac depends on transformers.src.models.modeling_outputs✕
- Type pairs
- 2 distinct (type in transformers.src.models.dac.modeling_dac → type in transformers.src.models.modeling_outputs) references.
- Which types
packages.transformers.src.models.dac.modeling_dac.DacDecoderOutput→packages.transformers.src.models.modeling_outputs.ModelOutputpackages.transformers.src.models.dac.modeling_dac.DacEncoderOutput→packages.transformers.src.models.modeling_outputs.ModelOutput
- Direction
- transformers.src.models.dac.modeling_dac uses transformers.src.models.modeling_outputs. Changing transformers.src.models.modeling_outputs can break transformers.src.models.dac.modeling_dac, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
13→6 transformers.src.models.dac.modeling_dac depends on transformers.src.models.modeling_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.dac.modeling_dac → type in transformers.src.models.modeling_utils) reference.
- Which types
packages.transformers.src.models.dac.modeling_dac.DacPreTrainedModel→packages.transformers.src.models.modeling_utils.PreTrainedModel
- Direction
- transformers.src.models.dac.modeling_dac uses transformers.src.models.modeling_utils. Changing transformers.src.models.modeling_utils can break transformers.src.models.dac.modeling_dac, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
14→5 transformers.src.models.detr.modeling_detr depends on transformers.src.models.modeling_outputs✕
- Type pairs
- 2 distinct (type in transformers.src.models.detr.modeling_detr → type in transformers.src.models.modeling_outputs) references.
- Which types
packages.transformers.src.models.detr.modeling_detr.DetrObjectDetectionOutput→packages.transformers.src.models.modeling_outputs.ModelOutputpackages.transformers.src.models.detr.modeling_detr.DetrSegmentationOutput→packages.transformers.src.models.modeling_outputs.ModelOutput
- Direction
- transformers.src.models.detr.modeling_detr uses transformers.src.models.modeling_outputs. Changing transformers.src.models.modeling_outputs can break transformers.src.models.detr.modeling_detr, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
14→6 transformers.src.models.detr.modeling_detr depends on transformers.src.models.modeling_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.detr.modeling_detr → type in transformers.src.models.modeling_utils) reference.
- Which types
packages.transformers.src.models.detr.modeling_detr.DetrPreTrainedModel→packages.transformers.src.models.modeling_utils.PreTrainedModel
- Direction
- transformers.src.models.detr.modeling_detr uses transformers.src.models.modeling_utils. Changing transformers.src.models.modeling_utils can break transformers.src.models.detr.modeling_detr, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
15→4 transformers.src.models.donut.image_processing_donut depends on transformers.src.image_processors_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.donut.image_processing_donut → type in transformers.src.image_processors_utils) reference.
- Which types
packages.transformers.src.models.donut.image_processing_donut.DonutImageProcessor→packages.transformers.src.image_processors_utils.ImageProcessor
- Direction
- transformers.src.models.donut.image_processing_donut uses transformers.src.image_processors_utils. Changing transformers.src.image_processors_utils can break transformers.src.models.donut.image_processing_donut, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
16→3 transformers.src.models.encodec.feature_extraction_encodec depends on transformers.src.feature_extraction_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.encodec.feature_extraction_encodec → type in transformers.src.feature_extraction_utils) reference.
- Which types
packages.transformers.src.models.encodec.feature_extraction_encodec.EncodecFeatureExtractor→packages.transformers.src.feature_extraction_utils.FeatureExtractor
- Direction
- transformers.src.models.encodec.feature_extraction_encodec uses transformers.src.feature_extraction_utils. Changing transformers.src.feature_extraction_utils can break transformers.src.models.encodec.feature_extraction_encodec, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
17→3 transformers.src.models.gemma3n.feature_extraction_gemma3n depends on transformers.src.feature_extraction_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.gemma3n.feature_extraction_gemma3n → type in transformers.src.feature_extraction_utils) reference.
- Which types
packages.transformers.src.models.gemma3n.feature_extraction_gemma3n.Gemma3nAudioFeatureExtractor→packages.transformers.src.feature_extraction_utils.FeatureExtractor
- Direction
- transformers.src.models.gemma3n.feature_extraction_gemma3n uses transformers.src.feature_extraction_utils. Changing transformers.src.feature_extraction_utils can break transformers.src.models.gemma3n.feature_extraction_gemma3n, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
18→6 transformers.src.models.gemma3n.modeling_gemma3n depends on transformers.src.models.modeling_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.gemma3n.modeling_gemma3n → type in transformers.src.models.modeling_utils) reference.
- Which types
packages.transformers.src.models.gemma3n.modeling_gemma3n.Gemma3nPreTrainedModel→packages.transformers.src.models.modeling_utils.PreTrainedModel
- Direction
- transformers.src.models.gemma3n.modeling_gemma3n uses transformers.src.models.modeling_utils. Changing transformers.src.models.modeling_utils can break transformers.src.models.gemma3n.modeling_gemma3n, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
19→6 transformers.src.models.hubert.modeling_hubert depends on transformers.src.models.modeling_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.hubert.modeling_hubert → type in transformers.src.models.modeling_utils) reference.
- Which types
packages.transformers.src.models.hubert.modeling_hubert.HubertPreTrainedModel→packages.transformers.src.models.modeling_utils.PreTrainedModel
- Direction
- transformers.src.models.hubert.modeling_hubert uses transformers.src.models.modeling_utils. Changing transformers.src.models.modeling_utils can break transformers.src.models.hubert.modeling_hubert, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
20→6 transformers.src.models.llava.modeling_llava depends on transformers.src.models.modeling_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.llava.modeling_llava → type in transformers.src.models.modeling_utils) reference.
- Which types
packages.transformers.src.models.llava.modeling_llava.LlavaPreTrainedModel→packages.transformers.src.models.modeling_utils.PreTrainedModel
- Direction
- transformers.src.models.llava.modeling_llava uses transformers.src.models.modeling_utils. Changing transformers.src.models.modeling_utils can break transformers.src.models.llava.modeling_llava, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
21→4 transformers.src.models.maskformer.image_processing_maskformer depends on transformers.src.image_processors_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.maskformer.image_processing_maskformer → type in transformers.src.image_processors_utils) reference.
- Which types
packages.transformers.src.models.maskformer.image_processing_maskformer.MaskFormerImageProcessor→packages.transformers.src.image_processors_utils.ImageProcessor
- Direction
- transformers.src.models.maskformer.image_processing_maskformer uses transformers.src.image_processors_utils. Changing transformers.src.image_processors_utils can break transformers.src.models.maskformer.image_processing_maskformer, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
22→8 transformers.src.models.mbart.tokenization_mbart depends on transformers.src.tokenization_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.mbart.tokenization_mbart → type in transformers.src.tokenization_utils) reference.
- Which types
packages.transformers.src.models.mbart.tokenization_mbart.MBartTokenizer→packages.transformers.src.tokenization_utils.PreTrainedTokenizer
- Direction
- transformers.src.models.mbart.tokenization_mbart uses transformers.src.tokenization_utils. Changing transformers.src.tokenization_utils can break transformers.src.models.mbart.tokenization_mbart, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
23→5 transformers.src.models.mgp_str.modeling_mgp_str depends on transformers.src.models.modeling_outputs✕
- Type pairs
- 1 distinct (type in transformers.src.models.mgp_str.modeling_mgp_str → type in transformers.src.models.modeling_outputs) reference.
- Which types
packages.transformers.src.models.mgp_str.modeling_mgp_str.MgpstrModelOutput→packages.transformers.src.models.modeling_outputs.ModelOutput
- Direction
- transformers.src.models.mgp_str.modeling_mgp_str uses transformers.src.models.modeling_outputs. Changing transformers.src.models.modeling_outputs can break transformers.src.models.mgp_str.modeling_mgp_str, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
23→6 transformers.src.models.mgp_str.modeling_mgp_str depends on transformers.src.models.modeling_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.mgp_str.modeling_mgp_str → type in transformers.src.models.modeling_utils) reference.
- Which types
packages.transformers.src.models.mgp_str.modeling_mgp_str.MgpstrPreTrainedModel→packages.transformers.src.models.modeling_utils.PreTrainedModel
- Direction
- transformers.src.models.mgp_str.modeling_mgp_str uses transformers.src.models.modeling_utils. Changing transformers.src.models.modeling_utils can break transformers.src.models.mgp_str.modeling_mgp_str, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
24→5 transformers.src.models.mimi.modeling_mimi depends on transformers.src.models.modeling_outputs✕
- Type pairs
- 2 distinct (type in transformers.src.models.mimi.modeling_mimi → type in transformers.src.models.modeling_outputs) references.
- Which types
packages.transformers.src.models.mimi.modeling_mimi.MimiDecoderOutput→packages.transformers.src.models.modeling_outputs.ModelOutputpackages.transformers.src.models.mimi.modeling_mimi.MimiEncoderOutput→packages.transformers.src.models.modeling_outputs.ModelOutput
- Direction
- transformers.src.models.mimi.modeling_mimi uses transformers.src.models.modeling_outputs. Changing transformers.src.models.modeling_outputs can break transformers.src.models.mimi.modeling_mimi, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
24→6 transformers.src.models.mimi.modeling_mimi depends on transformers.src.models.modeling_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.mimi.modeling_mimi → type in transformers.src.models.modeling_utils) reference.
- Which types
packages.transformers.src.models.mimi.modeling_mimi.MimiPreTrainedModel→packages.transformers.src.models.modeling_utils.PreTrainedModel
- Direction
- transformers.src.models.mimi.modeling_mimi uses transformers.src.models.modeling_utils. Changing transformers.src.models.modeling_utils can break transformers.src.models.mimi.modeling_mimi, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
25→4 transformers.src.models.owlvit.image_processing_owlvit depends on transformers.src.image_processors_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.owlvit.image_processing_owlvit → type in transformers.src.image_processors_utils) reference.
- Which types
packages.transformers.src.models.owlvit.image_processing_owlvit.OwlViTImageProcessor→packages.transformers.src.image_processors_utils.ImageProcessor
- Direction
- transformers.src.models.owlvit.image_processing_owlvit uses transformers.src.image_processors_utils. Changing transformers.src.image_processors_utils can break transformers.src.models.owlvit.image_processing_owlvit, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
26→3 transformers.src.models.parakeet.feature_extraction_parakeet depends on transformers.src.feature_extraction_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.parakeet.feature_extraction_parakeet → type in transformers.src.feature_extraction_utils) reference.
- Which types
packages.transformers.src.models.parakeet.feature_extraction_parakeet.ParakeetFeatureExtractor→packages.transformers.src.feature_extraction_utils.FeatureExtractor
- Direction
- transformers.src.models.parakeet.feature_extraction_parakeet uses transformers.src.feature_extraction_utils. Changing transformers.src.feature_extraction_utils can break transformers.src.models.parakeet.feature_extraction_parakeet, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
27→4 transformers.src.models.qwen2_vl.image_processing_qwen2_vl depends on transformers.src.image_processors_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.qwen2_vl.image_processing_qwen2_vl → type in transformers.src.image_processors_utils) reference.
- Which types
packages.transformers.src.models.qwen2_vl.image_processing_qwen2_vl.Qwen2VLImageProcessor→packages.transformers.src.image_processors_utils.ImageProcessor
- Direction
- transformers.src.models.qwen2_vl.image_processing_qwen2_vl uses transformers.src.image_processors_utils. Changing transformers.src.image_processors_utils can break transformers.src.models.qwen2_vl.image_processing_qwen2_vl, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
28→6 transformers.src.models.qwen2_vl.modeling_qwen2_vl depends on transformers.src.models.modeling_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.qwen2_vl.modeling_qwen2_vl → type in transformers.src.models.modeling_utils) reference.
- Which types
packages.transformers.src.models.qwen2_vl.modeling_qwen2_vl.Qwen2VLPreTrainedModel→packages.transformers.src.models.modeling_utils.PreTrainedModel
- Direction
- transformers.src.models.qwen2_vl.modeling_qwen2_vl uses transformers.src.models.modeling_utils. Changing transformers.src.models.modeling_utils can break transformers.src.models.qwen2_vl.modeling_qwen2_vl, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
29→7 transformers.src.models.qwen2_vl.processing_qwen2_vl depends on transformers.src.processing_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.qwen2_vl.processing_qwen2_vl → type in transformers.src.processing_utils) reference.
- Which types
packages.transformers.src.models.qwen2_vl.processing_qwen2_vl.Qwen2VLProcessor→packages.transformers.src.processing_utils.Processor
- Direction
- transformers.src.models.qwen2_vl.processing_qwen2_vl uses transformers.src.processing_utils. Changing transformers.src.processing_utils can break transformers.src.models.qwen2_vl.processing_qwen2_vl, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
30→5 transformers.src.models.rt_detr.modeling_rt_detr depends on transformers.src.models.modeling_outputs✕
- Type pairs
- 1 distinct (type in transformers.src.models.rt_detr.modeling_rt_detr → type in transformers.src.models.modeling_outputs) reference.
- Which types
packages.transformers.src.models.rt_detr.modeling_rt_detr.RTDetrObjectDetectionOutput→packages.transformers.src.models.modeling_outputs.ModelOutput
- Direction
- transformers.src.models.rt_detr.modeling_rt_detr uses transformers.src.models.modeling_outputs. Changing transformers.src.models.modeling_outputs can break transformers.src.models.rt_detr.modeling_rt_detr, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
30→6 transformers.src.models.rt_detr.modeling_rt_detr depends on transformers.src.models.modeling_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.rt_detr.modeling_rt_detr → type in transformers.src.models.modeling_utils) reference.
- Which types
packages.transformers.src.models.rt_detr.modeling_rt_detr.RTDetrPreTrainedModel→packages.transformers.src.models.modeling_utils.PreTrainedModel
- Direction
- transformers.src.models.rt_detr.modeling_rt_detr uses transformers.src.models.modeling_utils. Changing transformers.src.models.modeling_utils can break transformers.src.models.rt_detr.modeling_rt_detr, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
31→6 transformers.src.models.ultravox.modeling_ultravox depends on transformers.src.models.modeling_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.ultravox.modeling_ultravox → type in transformers.src.models.modeling_utils) reference.
- Which types
packages.transformers.src.models.ultravox.modeling_ultravox.UltravoxPreTrainedModel→packages.transformers.src.models.modeling_utils.PreTrainedModel
- Direction
- transformers.src.models.ultravox.modeling_ultravox uses transformers.src.models.modeling_utils. Changing transformers.src.models.modeling_utils can break transformers.src.models.ultravox.modeling_ultravox, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
32→16 transformers.src.models.dac.feature_extraction_dac depends on transformers.src.models.encodec.feature_extraction_encodec✕
- Type pairs
- 1 distinct (type in transformers.src.models.dac.feature_extraction_dac → type in transformers.src.models.encodec.feature_extraction_encodec) reference.
- Which types
packages.transformers.src.models.dac.feature_extraction_dac.DacFeatureExtractor→packages.transformers.src.models.encodec.feature_extraction_encodec.EncodecFeatureExtractor
- Direction
- transformers.src.models.dac.feature_extraction_dac uses transformers.src.models.encodec.feature_extraction_encodec. Changing transformers.src.models.encodec.feature_extraction_encodec can break transformers.src.models.dac.feature_extraction_dac, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
33→6 transformers.src.models.gemma3.modeling_gemma3 depends on transformers.src.models.modeling_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.gemma3.modeling_gemma3 → type in transformers.src.models.modeling_utils) reference.
- Which types
packages.transformers.src.models.gemma3.modeling_gemma3.Gemma3PreTrainedModel→packages.transformers.src.models.modeling_utils.PreTrainedModel
- Direction
- transformers.src.models.gemma3.modeling_gemma3 uses transformers.src.models.modeling_utils. Changing transformers.src.models.modeling_utils can break transformers.src.models.gemma3.modeling_gemma3, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
33→20 transformers.src.models.gemma3.modeling_gemma3 depends on transformers.src.models.llava.modeling_llava✕
- Type pairs
- 1 distinct (type in transformers.src.models.gemma3.modeling_gemma3 → type in transformers.src.models.llava.modeling_llava) reference.
- Which types
packages.transformers.src.models.gemma3.modeling_gemma3.Gemma3ForConditionalGeneration→packages.transformers.src.models.llava.modeling_llava.LlavaForConditionalGeneration
- Direction
- transformers.src.models.gemma3.modeling_gemma3 uses transformers.src.models.llava.modeling_llava. Changing transformers.src.models.llava.modeling_llava can break transformers.src.models.gemma3.modeling_gemma3, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
34→20 transformers.src.models.idefics3.modeling_idefics3 depends on transformers.src.models.llava.modeling_llava✕
- Type pairs
- 1 distinct (type in transformers.src.models.idefics3.modeling_idefics3 → type in transformers.src.models.llava.modeling_llava) reference.
- Which types
packages.transformers.src.models.idefics3.modeling_idefics3.Idefics3ForConditionalGeneration→packages.transformers.src.models.llava.modeling_llava.LlavaForConditionalGeneration
- Direction
- transformers.src.models.idefics3.modeling_idefics3 uses transformers.src.models.llava.modeling_llava. Changing transformers.src.models.llava.modeling_llava can break transformers.src.models.idefics3.modeling_idefics3, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
35→28 transformers.src.models.qwen2_5_vl.modeling_qwen2_5_vl depends on transformers.src.models.qwen2_vl.modeling_qwen2_vl✕
- Type pairs
- 2 distinct (type in transformers.src.models.qwen2_5_vl.modeling_qwen2_5_vl → type in transformers.src.models.qwen2_vl.modeling_qwen2_vl) references.
- Which types
packages.transformers.src.models.qwen2_5_vl.modeling_qwen2_5_vl.Qwen2_5_VLForCausalLM→packages.transformers.src.models.qwen2_vl.modeling_qwen2_vl.Qwen2VLForCausalLMpackages.transformers.src.models.qwen2_5_vl.modeling_qwen2_5_vl.Qwen2_5_VLForConditionalGeneration→packages.transformers.src.models.qwen2_vl.modeling_qwen2_vl.Qwen2VLForConditionalGeneration
- Direction
- transformers.src.models.qwen2_5_vl.modeling_qwen2_5_vl uses transformers.src.models.qwen2_vl.modeling_qwen2_vl. Changing transformers.src.models.qwen2_vl.modeling_qwen2_vl can break transformers.src.models.qwen2_5_vl.modeling_qwen2_5_vl, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
36→29 transformers.src.models.qwen2_5_vl.processing_qwen2_5_vl depends on transformers.src.models.qwen2_vl.processing_qwen2_vl✕
- Type pairs
- 1 distinct (type in transformers.src.models.qwen2_5_vl.processing_qwen2_5_vl → type in transformers.src.models.qwen2_vl.processing_qwen2_vl) reference.
- Which types
packages.transformers.src.models.qwen2_5_vl.processing_qwen2_5_vl.Qwen2_5_VLProcessor→packages.transformers.src.models.qwen2_vl.processing_qwen2_vl.Qwen2VLProcessor
- Direction
- transformers.src.models.qwen2_5_vl.processing_qwen2_5_vl uses transformers.src.models.qwen2_vl.processing_qwen2_vl. Changing transformers.src.models.qwen2_vl.processing_qwen2_vl can break transformers.src.models.qwen2_5_vl.processing_qwen2_5_vl, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
37→6 transformers.src.models.rf_detr.modeling_rf_detr depends on transformers.src.models.modeling_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.rf_detr.modeling_rf_detr → type in transformers.src.models.modeling_utils) reference.
- Which types
packages.transformers.src.models.rf_detr.modeling_rf_detr.RFDetrPreTrainedModel→packages.transformers.src.models.modeling_utils.PreTrainedModel
- Direction
- transformers.src.models.rf_detr.modeling_rf_detr uses transformers.src.models.modeling_utils. Changing transformers.src.models.modeling_utils can break transformers.src.models.rf_detr.modeling_rf_detr, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
37→30 transformers.src.models.rf_detr.modeling_rf_detr depends on transformers.src.models.rt_detr.modeling_rt_detr✕
- Type pairs
- 1 distinct (type in transformers.src.models.rf_detr.modeling_rf_detr → type in transformers.src.models.rt_detr.modeling_rt_detr) reference.
- Which types
packages.transformers.src.models.rf_detr.modeling_rf_detr.RFDetrObjectDetectionOutput→packages.transformers.src.models.rt_detr.modeling_rt_detr.RTDetrObjectDetectionOutput
- Direction
- transformers.src.models.rf_detr.modeling_rf_detr uses transformers.src.models.rt_detr.modeling_rt_detr. Changing transformers.src.models.rt_detr.modeling_rt_detr can break transformers.src.models.rf_detr.modeling_rf_detr, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
38→6 transformers.src.models.rt_detr_v2.modeling_rt_detr_v2 depends on transformers.src.models.modeling_utils✕
- Type pairs
- 1 distinct (type in transformers.src.models.rt_detr_v2.modeling_rt_detr_v2 → type in transformers.src.models.modeling_utils) reference.
- Which types
packages.transformers.src.models.rt_detr_v2.modeling_rt_detr_v2.RTDetrV2PreTrainedModel→packages.transformers.src.models.modeling_utils.PreTrainedModel
- Direction
- transformers.src.models.rt_detr_v2.modeling_rt_detr_v2 uses transformers.src.models.modeling_utils. Changing transformers.src.models.modeling_utils can break transformers.src.models.rt_detr_v2.modeling_rt_detr_v2, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
38→30 transformers.src.models.rt_detr_v2.modeling_rt_detr_v2 depends on transformers.src.models.rt_detr.modeling_rt_detr✕
- Type pairs
- 1 distinct (type in transformers.src.models.rt_detr_v2.modeling_rt_detr_v2 → type in transformers.src.models.rt_detr.modeling_rt_detr) reference.
- Which types
packages.transformers.src.models.rt_detr_v2.modeling_rt_detr_v2.RTDetrV2ObjectDetectionOutput→packages.transformers.src.models.rt_detr.modeling_rt_detr.RTDetrObjectDetectionOutput
- Direction
- transformers.src.models.rt_detr_v2.modeling_rt_detr_v2 uses transformers.src.models.rt_detr.modeling_rt_detr. Changing transformers.src.models.rt_detr.modeling_rt_detr can break transformers.src.models.rt_detr_v2.modeling_rt_detr_v2, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
39→35 transformers.src.models.qwen3_vl.modeling_qwen3_vl depends on transformers.src.models.qwen2_5_vl.modeling_qwen2_5_vl✕
- Type pairs
- 2 distinct (type in transformers.src.models.qwen3_vl.modeling_qwen3_vl → type in transformers.src.models.qwen2_5_vl.modeling_qwen2_5_vl) references.
- Which types
packages.transformers.src.models.qwen3_vl.modeling_qwen3_vl.Qwen3VLForCausalLM→packages.transformers.src.models.qwen2_5_vl.modeling_qwen2_5_vl.Qwen2_5_VLForCausalLMpackages.transformers.src.models.qwen3_vl.modeling_qwen3_vl.Qwen3VLForConditionalGeneration→packages.transformers.src.models.qwen2_5_vl.modeling_qwen2_5_vl.Qwen2_5_VLForConditionalGeneration
- Direction
- transformers.src.models.qwen3_vl.modeling_qwen3_vl uses transformers.src.models.qwen2_5_vl.modeling_qwen2_5_vl. Changing transformers.src.models.qwen2_5_vl.modeling_qwen2_5_vl can break transformers.src.models.qwen3_vl.modeling_qwen3_vl, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
40→39 transformers.src.models.qwen3_5.modeling_qwen3_5 depends on transformers.src.models.qwen3_vl.modeling_qwen3_vl✕
- Type pairs
- 1 distinct (type in transformers.src.models.qwen3_5.modeling_qwen3_5 → type in transformers.src.models.qwen3_vl.modeling_qwen3_vl) reference.
- Which types
packages.transformers.src.models.qwen3_5.modeling_qwen3_5.Qwen3_5ForConditionalGeneration→packages.transformers.src.models.qwen3_vl.modeling_qwen3_vl.Qwen3VLForConditionalGeneration
- Direction
- transformers.src.models.qwen3_5.modeling_qwen3_5 uses transformers.src.models.qwen3_vl.modeling_qwen3_vl. Changing transformers.src.models.qwen3_vl.modeling_qwen3_vl can break transformers.src.models.qwen3_5.modeling_qwen3_5, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
At a glance — Code Health
At a glance — Architecture
At a glance — Maturity
At a glance — Readiness
At a glance — Security
At a glance — Performance
Security & Compliance — OWASP Top-10 mapping
| OWASP category | Findings | Severity |
|---|---|---|
| A06:2021 — Vulnerable & Outdated Components | 10 | High / Critical |
| A03:2021 — Injection | 8 | High / Critical |
Roadmap
First, integrate static security analysis into the CI pipeline to block security regressions before they land. Second, automate the release and deployment process to ensure all updates are repeatable and easily reversible. Third, maintain a clear changelog to track what ships in each release. Finally, remove unused dependencies and replace synchronous API calls with asynchronous equivalents to improve system performance and reliability.
| Do this | Helps | Effort | Dimension |
|---|---|---|---|
| Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing. | +5.1 pts | Medium | Security & performance tooling |
| Automate the release in CI — a deploy stage for a service (Helm/Kubernetes manifests or an equivalent rollout), or a tag-triggered publish job for an artifact — so releases are repeatable and reversible. | +5.1 pts | Medium | Deployment & Rollback |
| Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release. | +5.1 pts | Medium | Release Hygiene |
| Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies. | +5.0 pts | Medium | Dependency Hygiene |
| TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants. | +2.1 pts | Medium | Async & latency hygiene |
| Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form). | +1.1 pts | Medium | Architecture documentation |
| Resolve the 8 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (8). | +0.5 pts | Low | Dependency Vulnerabilities |
| Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5. | +0.9 pts | Medium | Cyclomatic Complexity |
File quality
| File | Score | Band | Worst signal |
|---|---|---|---|
| REDACTED | 1.6 | Slop | Dependency Vulnerabilities: High CVE: REDACTED |
| REDACTED | 4.0 | Mixed | Static Analysis (SAST): Medium: REDACTED |
| REDACTED | 5.1 | Mixed | Static Analysis (SAST): High: REDACTED |
| packages/transformers-structured-output/src/engine/json.ts | 7.0 | Mixed | Cyclomatic Complexity: json.checkSchema (cyclomatic 64) |
| packages/transformers/src/image_processors_utils.js | 7.0 | Mixed | Cyclomatic Complexity: preprocess (cyclomatic 26) |
| packages/transformers/docs/scripts/lib/render-api.mjs | 7.0 | Mixed | Cyclomatic Complexity: render-api.renderType (cyclomatic 19) |
| packages/transformers/src/models/modeling_utils.js | 7.1 | Mixed | Cyclomatic Complexity: PreTrainedModel._get_logits_processor (cyclomatic 26) |
| packages/transformers/src/utils/tensor.js | 7.1 | Mixed | Cyclomatic Complexity: Tensor.slice (cyclomatic 19) |
| packages/transformers/src/models/whisper/tokenization_whisper.js | 7.2 | Mixed | Cyclomatic Complexity: WhisperTokenizer._decode_asr (cyclomatic 52) |
| packages/transformers-structured-output/src/engine/tokenizer.ts | 7.2 | Mixed | Cyclomatic Complexity: tokenizer.extractTokenizer (cyclomatic 26) |
| packages/transformers/docs/scripts/lib/validate.mjs | 7.2 | Mixed | Cyclomatic Complexity: validate.collectDocWarnings (cyclomatic 19) |
| packages/transformers/src/models/lfm2_vl/image_processing_lfm2_vl.js | 7.2 | Mixed | Cyclomatic Complexity: _call (cyclomatic 16) |
| packages/transformers/src/utils/maths.js | 7.2 | Mixed | Cognitive Complexity: P2FFT._realTransform4 (cognitive 21) |
| packages/transformers/src/configs.js | 7.4 | Mixed | Cyclomatic Complexity: getCacheNames (cyclomatic 37) |
| packages/transformers-structured-output/src/engine/constraint.ts | 7.4 | Mixed | Cyclomatic Complexity: constraint.createTokenConstraint (cyclomatic 28) |
| packages/transformers/src/models/whisper/modeling_whisper.js | 7.4 | Mixed | Cyclomatic Complexity: WhisperForConditionalGeneration._generate_with_seek (cyclomatic 24) |
| packages/transformers/docs/scripts/lib/scan.mjs | 7.4 | Mixed | Cyclomatic Complexity: scan.splitConditional (cyclomatic 18) |
| packages/transformers/src/utils/audio.js | 7.8 | Mixed | Cyclomatic Complexity: spectrogram (cyclomatic 48) |
| packages/transformers/src/utils/hub.js | 7.8 | Mixed | Cyclomatic Complexity: hub.loadResourceFile (cyclomatic 43) |
| packages/transformers/src/utils/model_registry/get_file_metadata.js | 7.8 | Mixed | Cyclomatic Complexity: get_file_metadata._get_file_metadata (cyclomatic 29) |
How the grades work
A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.
Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.
Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.
Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 44 of 48 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
What we checked — 48 dimensions across the health lenses
- Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 250 of 264 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line.
- Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
- Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
Tools & methods
| Method | Backs | Version | Evaluator |
|---|---|---|---|
| Roslyn static analysis | Complexity, cohesion, coupling, dead code, API surface, layering | 5.3.0 | ✓ deterministic |
| Native secret scanner | Hardcoded secrets / credentials | 1.0.0 | ✓ deterministic |
| Watchdog duplication detector (in-process) | Code duplication | 1.0.0 | ✓ deterministic |
| Coverage (coverlet / dotnet-coverage) | Line & branch coverage | 10.0.400 | ✓ deterministic |
| NuGet / dotnet | Outdated, vulnerable & deprecated dependencies | 10.0.400 | ✓ deterministic |
| git / LibGit2Sharp | Churn hotspots, knowledge concentration, history | 2.43.0 · 0.31.0 | ✓ deterministic |
| gitleaks · semgrep · trivy | Secrets in history, SAST, CVEs, IaC & container, PII / GDPR | 1.86.0 · 0.69.3 | ✓ deterministic |
| LLM (sampled · advisory) | Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurement | Local LLM | ◐ LLM · sampled · advisory |
Run transparency — what happened this run
- D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability not scored — the JavaScript/TypeScript suite (jest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/transformers/ (0 tests); jest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/transformers-structured-output/ (0 tests)) ran but surfaced no test cases to the runner, so flakiness couldn't be exercised.
- D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (77 contributor(s) across 2016 commit(s) sampled, automation and bot accounts excluded). One of them holds 91% of the history; the other 76 hold 0.1% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
- D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (packages/transformers-structured-output/package.json), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
- D44 Platform End-of-Life — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
- AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
- C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
- C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
- C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
- ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
- GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
- R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 30 further occurrence(s) are not listed individually; the score already reflects all 70.
- S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
- X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java and Rust source only, and no C# was loaded and no Java or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X28 Index access outside its own emptiness guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Scala source only, and no C# was loaded and no Scala was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Scala source only, and no C# was loaded and no Scala was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
- D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
- D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
- D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
- D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
- D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
- D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
- D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
- D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
- D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
- D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
- D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
- D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
- D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
- D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
- D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
- D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
- D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
- D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
- D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
- D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
- D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
- AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
- M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
- P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
- P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
Dimensions
D1 · Cyclomatic Complexity
71 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was json.checkSchema at 64. A further 4 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being configs.getNormalizedConfig at 120 — they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: packages/transformers/docs/scripts/lib/parse.mjs (parse.parseTag at 21), packages/transformers/src/backends/onnx.js (onnx.ensureWasmLoaded at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
What to do
- Resolve the 1 json.checkSchema (cyclomatic 64) finding(s) in Cyclomatic Complexity — start with json.ts. — One of this dimension's main actionable groups (1 warning-level).
- Resolve the 1 WhisperTokenizer._decode_asr (cyclomatic 52) finding(s) in Cyclomatic Complexity — start with tokenization_whisper.js. — One of this dimension's main actionable groups (1 warning-level).
- Resolve the 1 spectrogram (cyclomatic 48) finding(s) in Cyclomatic Complexity — start with audio.js. — One of this dimension's main actionable groups (1 warning-level).
- Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D2 · Cognitive Complexity
134 method(s) exceeded the cognitive complexity threshold of 15; the worst was WhisperTokenizer._decode_asr at 151.
What to do
- Resolve the 1 WhisperTokenizer._decode_asr (cognitive 151) finding(s) in Cognitive Complexity — start with tokenization_whisper.js. — One of this dimension's main actionable groups (1 warning-level).
- Resolve the 1 spectrogram (cognitive 75) finding(s) in Cognitive Complexity — start with audio.js. — One of this dimension's main actionable groups (1 warning-level).
- Resolve the 1 loadResourceFile (cognitive 75) finding(s) in Cognitive Complexity — start with hub.js. — One of this dimension's main actionable groups (1 warning-level).
- Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D3 · God Classes
6 god class(es) detected.
What to do
- Resolve the 4 FileTooLong finding(s) in God Classes — start with json.ts, modeling_utils.js, tensor.js. — One of this dimension's main actionable groups (4 warning-level).
- Resolve the 1 FunctionTooLong finding(s) in God Classes — start with configs.js. — One of this dimension's main actionable groups (1 warning-level).
- Resolve the 1 TooManyMethods finding(s) in God Classes — start with tensor.js. — One of this dimension's main actionable groups (1 warning-level).
- Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D5 · Coupling
2 production modules (npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence, with abstractness counted on 1 of the 2 (the rest declare no modelled class or interface, export only macros, or have no source directory of their own).
D6 · Cohesion (LCOM4)
0 of 38 classes have LCOM4 above 3.
D9 · Test Distribution
363 test methods: 363 unit, 0 integration, 0 BDD, 0 e2e. The JavaScript/TypeScript suite contributes 363 `it`/`test` case(s) across 24 test file(s) declaring at least one; its tier split is read from package names and paths only.
D10 · Test Quality
0 skipped, 2 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 363 tests.
What to do
- Resolve the 2 No assertions finding(s) in Test Quality — start with types.test.js, progress_callbacks.test.js. — One of this dimension's main actionable groups (2 warning-level).
- Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D12 · Dependency Hygiene
1 outdated direct production npm dependency(ies) of 5 graded, 0 pinning defect(s), across 3 package.json (3 of them the product) and 1 committed lockfile(s). Development dependencies are deliberately not graded: this dimension grades what SHIPS. Whether any of these packages is DEPRECATED or UNMAINTAINED is not graded — registry.npmjs.org's latest-version answer carries neither, and release age does not stand in for a maintenance status. Whether any is UNUSED is not graded either: that is a source question, and the frontend dependency lens (R8) answers it in this same run. Known CVEs in this dependency graph are D30's question, read from the manifest there.
D13 · Secret Scanning
Secret scan ran and found no leaked secrets.
D14 · License Compliance
0 of 5 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 5 production dependency(ies) this repository's committed lockfile resolves, across 3 product package.json manifest(s). Its 15 `devDependencies` declaration(s) are excluded: a consumer installs none of them. ★ DEPTH: this is the DIRECT production set the lockfile resolves, NOT the transitive closure — only one of the four lock dialects this pass reads states a full graph, so a banned licence pulled in only by a dependency's OWN dependencies is outside this verdict, exactly as the JVM arm's declaration-site verdict is. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. This repository publishes itself under Apache-2.0, which is its own choice and is not judged here.
D15 · Churn × Complexity Hotspots
Top hotspots: packages/transformers/src/utils/hub.js (3×43=129)
What to do
- Resolve the 1 Hotspot finding(s) in Churn × Complexity Hotspots — start with hub.js. — One of this dimension's main actionable groups (1 warning-level).
D17 · Explicit Debt
0 deducted task-comment markers across 2755 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
D19 · Documentation Quality
The repository's root README and a focused transformers-structured-output README are the only visible documents; both describe their respective packages clearly. The main documentation is an extensive architecture/Docs directory containing 16 markdown files (including one titled 'Guides') that cover installation, usage examples, supported tasks/models, custom models, quantized dtypes, server-side audio processing in Node.js, WebGPU acceleration, and the Vercel AI SDK integration — all of which are well-organized with a navigation table and an overview section. The root README is the single document that needs to be judged for its scope (overview/installation/usage/contributing/license), but it is not shown here. The project's READMEs are excellent tutorials for building Next.js applications using Transformers.js and the Vercel AI SDK v6. Each document is a self-contained tutorial with an overview (what it builds and what links), prerequisites, step-by-step code blocks showing installation, configuration, model loading, inference, and UI rendering, plus useful links to source code and demos. The architecture/Docs markdown files are also present but not shown in the summary.
What to do
- Improve Documentation Quality — currently 8.7/10. — The repository's root README and a focused transformers-structured-output README are the only visible documents; both describe their respective packages clearly. The main documentation is an extensive architecture/Docs directory containing 16 markdown files (including one titled 'Guides') that cover installation, usage examples, supported tasks/models, custom models, quantized dtypes, server-side audio processing in Node.js, WebGPU acceleration, and the Vercel AI SDK integration — all of which are well-organized with a navigation table and an overview section. The root README is the single document that needs to be judged for its scope (overview/installation/usage/contributing/license), but it is not shown here. The project's READMEs are excellent tutorials for building Next.js applications using Transformers.js and the Vercel AI SDK v6. Each document is a self-contained tutorial with an overview (what it builds and what links), prerequisites, step-by-step code blocks showing installation, configuration, model loading, inference, and UI rendering, plus useful links to source code and demos. The architecture/Docs markdown files are also present but not shown in the summary.
D21 · Naming Consistency
0 naming inconsistencies across 0 sampled symbols.
D26 · Project Cohesion
1 of 3 build units (npm) flagged as possibly oversized/incoherent.
What to do
- Resolve the 1 Split packages/transformers finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
D28 · Secrets (history)
gitleaks scanned the full history AND the current working tree and found no secrets.
D29 · Static Analysis (SAST)
8 finding(s): 0 critical, 3 high, 5 medium, 0 low.
What to do
- Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
- Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
- Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
D30 · Dependency Vulnerabilities
10 finding(s): 0 critical, 8 high, 1 medium, 1 low.
What to do
- Resolve the 8 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (8). — One of this dimension's main actionable groups (8 issue-level).
- Resolve the 1 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
- Resolve the 1 Low CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
D34 · Knowledge Freshness
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 150 of the 457 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
D35 · Change Coupling
No strong hidden change-coupling between production files.
D36 · Supply-chain Provenance & Signing
1/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).
What to do
- Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
- Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
- Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
D43 · Malicious Dependencies
No dependency in any ecosystem this repository declares is published as malicious.
Frontend & cross-cutting dimensions
AX10 · Code composition
What to do
- The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX3 · Project dependency cycles
AX4 · Dependency direction
M1 · Documentation (README)
What to do
- Add a 'Testing' section to the root README — how to run the test suite.
- Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
- Add a README to the 1 of 2 project(s) that lack one — worth up to 1 pts.
M2 · Architecture documentation
- No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
- Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
M3 · Folder & project structure
M4 · Documentation accuracy
- README advertises Salesforce integration, but no Salesforce code/dependency exists — searched for: `salesforce`, `sfdx`, `apex`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.
What to do
- Reconcile the README with reality: README advertises Salesforce integration, but no Salesforce code/dependency exists.
P1 · CI/CD gates
P10 · Library API & versioning
P3 · Security & performance tooling
- No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 4989 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
What to do
- Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
- Dependabot is configured but does not watch `npm` — add that `package-ecosystem` entry to .github/dependabot.yml so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
- Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback
- No release automation was found in CI — neither a deploy stage (Helm/Kubernetes/compose manifests, an orchestrated rollout) nor a publish job that ships the built artifact. Releases appear to be run by hand, which is slower, less repeatable and harder to reverse.
What to do
- Automate the release in CI — a deploy stage for a service (Helm/Kubernetes manifests or an equivalent rollout), or a tag-triggered publish job for an artifact — so releases are repeatable and reversible.
P6 · Release Hygiene
- No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
- Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
PF3 · Async & latency hygiene
- `collect_tests` is async and calls readdirSync, existsSync, statSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/transformers/tests/test_utils.js:16
- `collect_and_execute_pipeline_tests` is async and calls readdirSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/transformers/tests/test_utils.js:55
What to do
- TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
R1 · Type Safety
What to do
- Migrate the remaining .js/.jsx files to TypeScript.
R10 · Code Duplication
- 63 duplicated blocks under packages/transformers/src/models/ have copies in at least two of the sibling directories albert, audio_spectrogram_transformer, bart, bert, camembert, chatterbox (+60 more sibling(s) not listed) — 26 of them are reported below, and 37 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 63 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 63 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 63 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/transformers/src/models/dac/modeling_dac.js:6
- packages/transformers/src/models/dac/modeling_dac.js:6 · packages/transformers/src/models/mimi/modeling_mimi.js:6 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/transformers/src/models/dac/modeling_dac.js:6
- packages/transformers/src/models/auto/modeling_auto.js:75 · packages/transformers/src/models/modeling_utils.js:256 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/transformers/src/models/auto/modeling_auto.js:75
- packages/transformers/src/utils/model_registry/clear_cache.js:48 · packages/transformers/src/utils/model_registry/is_cached.js:32 — the two spans are one implementation copied and then locally edited — 170 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/transformers/src/utils/model_registry/clear_cache.js:48
- packages/transformers/src/utils/maths.js:460 · packages/transformers/src/utils/maths.js:634 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/transformers/src/utils/maths.js:460
- packages/transformers/src/models/idefics3/image_processing_idefics3.js:178 · packages/transformers/src/models/phi3_v/image_processing_phi3_v.js:109 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/transformers/src/models/idefics3/image_processing_idefics3.js:178
- packages/transformers/src/pipelines/audio-classification.js:71 · packages/transformers/src/pipelines/image-classification.js:84 — the two spans are one implementation copied and then locally edited — 161 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/transformers/src/pipelines/audio-classification.js:71
- packages/transformers/src/generation/logits_process.js:516 · packages/transformers/src/generation/logits_process.js:555 — the two spans are one implementation copied and then locally edited — 108 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/transformers/src/generation/logits_process.js:516
- packages/transformers/src/models/audio_spectrogram_transformer/feature_extraction_audio_spectrogram_transformer.js:5 · packages/transformers/src/models/seamless_m4t/feature_extraction_seamless_m4t.js:5 · packages/transformers/src/models/wespeaker/feature_extraction_wespeaker.js:5 — the 3 copies are spread across 3 files, and each CITED SPAN is a SPECIALISATION DECLARATION — a type whose `extends` clause names a base and whose body hands that base its own values through `super(…)`. The shared module this dimension usually asks you to extract already exists: it is that base, every one of these sites already reaches it, and the `super(…)` call this row matched on is where each site passes its differences in. So do not read this as an extract-a-helper row — there is no missing helper, and what is left at each site is the declaration of one distinct specialisation, which cannot be deleted without deleting the thing it declares. Read what actually differs between the spans, because two different answers follow. Where the sites differ only in the values they hand the base — a type argument, a service, an alias, a cache — the repetition is a TEMPLATE, and the only moves that collapse it are to generate these declarations from the set they enumerate or to replace the repeated construction with one factory each site calls with its own values; where that set is the point, each site pinning one distinct thing, the repetition IS the enumeration and there is nothing to remove. Where instead a span carries logic OUTSIDE the delegation that is the same at every site, that logic is the part to move, and its home is the base type rather than a new module. Reported because the copies still drift apart the first time only one of them is edited. — packages/transformers/src/models/audio_spectrogram_transformer/feature_extraction_audio_spectrogram_transformer.js:5
- packages/transformers/src/utils/image.js:248 · packages/transformers/src/utils/image.js:280 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/transformers/src/utils/image.js:248
- packages/transformers/src/models/seamless_m4t/feature_extraction_seamless_m4t.js:33 · packages/transformers/src/models/wespeaker/feature_extraction_wespeaker.js:33 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/transformers/src/models/seamless_m4t/feature_extraction_seamless_m4t.js:33
- packages/transformers/src/models/clap/modeling_clap.js:5 · packages/transformers/src/models/clip/modeling_clip.js:48 · packages/transformers/src/models/clip/modeling_clip.js:99 · packages/transformers/src/models/dac/modeling_dac.js:55 · +4 more site(s) not listed — the 8 copies are spread across 7 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/transformers/src/models/clap/modeling_clap.js:5
- packages/transformers/src/models/gemma3/processing_gemma3.js:15 · packages/transformers/src/models/gemma3n/processing_gemma3n.js:32 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/transformers/src/models/gemma3/processing_gemma3.js:15
- packages/transformers/src/models/gemma3n/modeling_gemma3n.js:19 · packages/transformers/src/models/phi3_v/modeling_phi3_v.js:12 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/transformers/src/models/gemma3n/modeling_gemma3n.js:19
- packages/transformers/src/models/granite_speech/processing_granite_speech.js:45 · packages/transformers/src/models/ultravox/processing_ultravox.js:37 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — packages/transformers/src/models/granite_speech/processing_granite_speech.js:45
- packages/transformers/src/image_processors_utils.js:1051 · packages/transformers/src/models/vitmatte/image_processing_vitmatte.js:13 — the two spans are one implementation copied and then locally edited — 99 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/transformers/src/image_processors_utils.js:1051
- packages/transformers/src/models/voxtral_realtime/feature_extraction_voxtral_realtime.js:4 · packages/transformers/src/models/whisper/feature_extraction_whisper.js:6 — the 2 copies are spread across 2 files, and each CITED SPAN is a SPECIALISATION DECLARATION — a type whose `extends` clause names a base and whose body hands that base its own values through `super(…)`. The shared module this dimension usually asks you to extract already exists: it is that base, every one of these sites already reaches it, and the `super(…)` call this row matched on is where each site passes its differences in. So do not read this as an extract-a-helper row — there is no missing helper, and what is left at each site is the declaration of one distinct specialisation, which cannot be deleted without deleting the thing it declares. Read what actually differs between the spans, because two different answers follow. Where the sites differ only in the values they hand the base — a type argument, a service, an alias, a cache — the repetition is a TEMPLATE, and the only moves that collapse it are to generate these declarations from the set they enumerate or to replace the repeated construction with one factory each site calls with its own values; where that set is the point, each site pinning one distinct thing, the repetition IS the enumeration and there is nothing to remove. Where instead a span carries logic OUTSIDE the delegation that is the same at every site, that logic is the part to move, and its home is the base type rather than a new module. Reported because the copies still drift apart the first time only one of them is edited. — packages/transformers/src/models/voxtral_realtime/feature_extraction_voxtral_realtime.js:4
- packages/transformers/src/utils/tensor.js:846 · packages/transformers/src/utils/tensor.js:868 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/transformers/src/utils/tensor.js:846
- packages/transformers/src/generation/logits_process.js:201 · packages/transformers/src/generation/logits_process.js:441 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/transformers/src/generation/logits_process.js:201
- packages/transformers/src/models/dac/modeling_dac.js:6 · packages/transformers/src/models/mimi/modeling_mimi.js:6 · packages/transformers/src/models/modeling_outputs.js:49 — the 3 copies are spread across 3 files, and each CITED SPAN is a SPECIALISATION DECLARATION — a type whose `extends` clause names a base and whose body hands that base its own values through `super(…)`. The shared module this dimension usually asks you to extract already exists: it is that base, every one of these sites already reaches it, and the `super(…)` call this row matched on is where each site passes its differences in. So do not read this as an extract-a-helper row — there is no missing helper, and what is left at each site is the declaration of one distinct specialisation, which cannot be deleted without deleting the thing it declares. Read what actually differs between the spans, because two different answers follow. Where the sites differ only in the values they hand the base — a type argument, a service, an alias, a cache — the repetition is a TEMPLATE, and the only moves that collapse it are to generate these declarations from the set they enumerate or to replace the repeated construction with one factory each site calls with its own values; where that set is the point, each site pinning one distinct thing, the repetition IS the enumeration and there is nothing to remove. Where instead a span carries logic OUTSIDE the delegation that is the same at every site, that logic is the part to move, and its home is the base type rather than a new module. Reported because the copies still drift apart the first time only one of them is edited. — packages/transformers/src/models/dac/modeling_dac.js:6
- packages/transformers/src/models/encodec/feature_extraction_encodec.js:10 · packages/transformers/src/models/wav2vec2/feature_extraction_wav2vec2.js:22 — the two spans are one implementation copied and then locally edited — 56 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/transformers/src/models/encodec/feature_extraction_encodec.js:10
- packages/transformers/src/utils/maths.js:399 · packages/transformers/src/utils/maths.js:572 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/transformers/src/utils/maths.js:399
- packages/transformers/src/configs.js:520 · REDACTED:310 — the two spans are one implementation copied and then locally edited — 52 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/transformers/src/configs.js:520
- packages/transformers/src/generation/logits_process.js:166 · packages/transformers/src/generation/logits_process.js:486 · packages/transformers/src/generation/logits_process.js:561 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/transformers/src/generation/logits_process.js:166
- packages/transformers/src/ops/registry.js:49 · packages/transformers/src/ops/registry.js:66 · packages/transformers/src/ops/registry.js:84 · packages/transformers/src/ops/registry.js:99 · +2 more site(s) not listed — all 6 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/transformers/src/ops/registry.js:49
- packages/transformers/src/generation/logits_sampler.js:120 · packages/transformers/src/generation/logits_sampler.js:151 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/transformers/src/generation/logits_sampler.js:120
- packages/transformers/src/models/chatterbox/feature_extraction_chatterbox.js:10 · packages/transformers/src/models/moonshine/feature_extraction_moonshine.js:10 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — packages/transformers/src/models/chatterbox/feature_extraction_chatterbox.js:10
- packages/transformers/src/models/detr/modeling_detr.js:1 · packages/transformers/src/models/hubert/modeling_hubert.js:2 · packages/transformers/src/models/rt_detr/modeling_rt_detr.js:1 · packages/transformers/src/models/yolos/modeling_yolos.js:1 — the 4 copies are spread across 4 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/transformers/src/models/detr/modeling_detr.js:1
- packages/transformers/src/models/modeling_utils.js:335 · packages/transformers/src/pipelines.js:147 — the two spans are one implementation copied and then locally edited — 75 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/transformers/src/models/modeling_utils.js:335
- packages/transformers/src/models/unispeech/modeling_unispeech.js:2 · packages/transformers/src/models/unispeech_sat/modeling_unispeech_sat.js:2 · packages/transformers/src/models/wav2vec2/modeling_wav2vec2.js:2 · packages/transformers/src/models/wav2vec2_bert/modeling_wav2vec2_bert.js:2 — the 4 copies are spread across 4 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/transformers/src/models/unispeech/modeling_unispeech.js:2
- packages/transformers/src/models/encodec/feature_extraction_encodec.js:4 · packages/transformers/src/models/pyannote/feature_extraction_pyannote.js:5 — the two spans are one implementation copied and then locally edited — 56 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/transformers/src/models/encodec/feature_extraction_encodec.js:4
- packages/transformers/src/models/m2m_100/tokenization_m2m_100.js:13 · packages/transformers/src/models/mbart/tokenization_mbart.js:3 — the two spans are one implementation copied and then locally edited — 88 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/transformers/src/models/m2m_100/tokenization_m2m_100.js:13
- packages/transformers/src/models/m2m_100/tokenization_m2m_100.js:13 · packages/transformers/src/models/nllb/tokenization_nllb.js:16 — the two spans are one implementation copied and then locally edited — 79 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/transformers/src/models/m2m_100/tokenization_m2m_100.js:13
- packages/transformers/src/models/mbart/tokenization_mbart.js:3 · packages/transformers/src/models/nllb/tokenization_nllb.js:16 — the two spans are one implementation copied and then locally edited — 80 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/transformers/src/models/mbart/tokenization_mbart.js:3
- packages/transformers/src/models/sam/modeling_sam.js:4 · packages/transformers/src/models/vits/modeling_vits.js:1 · packages/transformers/src/models/wavlm/modeling_wavlm.js:2 — the 3 copies are spread across 3 files, and each CITED SPAN is a SPECIALISATION DECLARATION — a type whose `extends` clause names a base and whose body hands that base its own values through `super(…)`. The shared module this dimension usually asks you to extract already exists: it is that base, every one of these sites already reaches it, and the `super(…)` call this row matched on is where each site passes its differences in. So do not read this as an extract-a-helper row — there is no missing helper, and what is left at each site is the declaration of one distinct specialisation, which cannot be deleted without deleting the thing it declares. Read what actually differs between the spans, because two different answers follow. Where the sites differ only in the values they hand the base — a type argument, a service, an alias, a cache — the repetition is a TEMPLATE, and the only moves that collapse it are to generate these declarations from the set they enumerate or to replace the repeated construction with one factory each site calls with its own values; where that set is the point, each site pinning one distinct thing, the repetition IS the enumeration and there is nothing to remove. Where instead a span carries logic OUTSIDE the delegation that is the same at every site, that logic is the part to move, and its home is the base type rather than a new module. Reported because the copies still drift apart the first time only one of them is edited. — packages/transformers/src/models/sam/modeling_sam.js:4
- packages/transformers/src/models/albert/modeling_albert.js:2 · packages/transformers/src/models/bert/modeling_bert.js:7 · packages/transformers/src/models/camembert/modeling_camembert.js:7 · packages/transformers/src/models/convbert/modeling_convbert.js:7 · +23 more site(s) not listed — the 27 copies are spread across 27 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/transformers/src/models/albert/modeling_albert.js:2
- packages/transformers/src/models/ultravox/processing_ultravox.js:8 · packages/transformers/src/models/voxtral/processing_voxtral.js:27 — the two spans are one implementation copied and then locally edited — 60 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/transformers/src/models/ultravox/processing_ultravox.js:8
- packages/transformers/src/models/whisper/tokenization_whisper.js:193 · packages/transformers/src/models/whisper/tokenization_whisper.js:291 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/transformers/src/models/whisper/tokenization_whisper.js:193
- packages/transformers/src/utils/tensor.js:223 · packages/transformers/src/utils/tensor.js:247 · packages/transformers/src/utils/tensor.js:269 · packages/transformers/src/utils/tensor.js:291 · +1 more site(s) not listed — all 5 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/transformers/src/utils/tensor.js:223
- packages/transformers-structured-output/scripts/dev.mjs:9 · scripts/rebuildPlugin.mjs:14 — the two spans are one implementation copied and then locally edited — 60 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/transformers-structured-output/scripts/dev.mjs:9
What to do
- Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R11 · Import Boundaries
- packages/transformers/scripts/build.mjs:2 reaches into another package with a relative path (../../../scripts/prepareOutDir.mjs) — import the package by name instead. — packages/transformers/scripts/build.mjs:2
- packages/transformers/scripts/build.mjs:3 reaches into another package with a relative path (../../../scripts/logger.mjs) — import the package by name instead. — packages/transformers/scripts/build.mjs:3
- packages/transformers/scripts/dev.mjs:6 reaches into another package with a relative path (../../../scripts/prepareOutDir.mjs) — import the package by name instead. — packages/transformers/scripts/dev.mjs:6
- packages/transformers/scripts/dev.mjs:7 reaches into another package with a relative path (../../../scripts/logger.mjs) — import the package by name instead. — packages/transformers/scripts/dev.mjs:7
What to do
- Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
R2 · Cyclomatic Complexity
- getNormalizedConfig has cyclomatic complexity 120 and cognitive complexity 7; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/transformers/src/configs.js:59
- checkSchema has cyclomatic complexity 64 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/transformers-structured-output/src/engine/json.ts:1568
- _decode_asr has cyclomatic complexity 52 and cognitive complexity 151; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/transformers/src/models/whisper/tokenization_whisper.js:29
- spectrogram has cyclomatic complexity 48 and cognitive complexity 75; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/transformers/src/utils/audio.js:484
- loadResourceFile has cyclomatic complexity 43 and cognitive complexity 75; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/transformers/src/utils/hub.js:265
- validateObjectNode has cyclomatic complexity 40 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/transformers-structured-output/src/engine/json.ts:1083
- getCacheNames has cyclomatic complexity 37 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/transformers/src/configs.js:344
- validateNode has cyclomatic complexity 36 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/transformers-structured-output/src/engine/json.ts:984
- _call has cyclomatic complexity 32 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:376
- _get_file_metadata has cyclomatic complexity 29 and cognitive complexity 53; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/transformers/src/utils/model_registry/get_file_metadata.js:59
- transition has cyclomatic complexity 29 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/transformers-structured-output/src/engine/json.ts:259
- extractTokenizer has cyclomatic complexity 26 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/transformers-structured-output/src/engine/tokenizer.ts:14
- preprocess has cyclomatic complexity 26 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/transformers/src/image_processors_utils.js:921
- _get_logits_processor has cyclomatic complexity 26 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/transformers/src/models/modeling_utils.js:404
- formatMatches has cyclomatic complexity 25 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/transformers-structured-output/src/engine/json.ts:1392
- _generate_with_seek has cyclomatic complexity 24 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/transformers/src/models/whisper/modeling_whisper.js:195
- _call has cyclomatic complexity 24 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/transformers/src/pipelines/image-segmentation.js:68
- generate has cyclomatic complexity 23 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/transformers/src/models/modeling_utils.js:845
- validateArrayNode has cyclomatic complexity 23 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/transformers-structured-output/src/engine/json.ts:1052
- getSession has cyclomatic complexity 23 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/transformers/src/models/session.js:26
What to do
- Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files
What to do
- Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage
- No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×10) — packages/transformers/scripts/dev.mjs, scripts/dev.mjs, packages/transformers-structured-output/scripts/dev.mjs, …
What to do
- Add tests that import the unreached modules (directly or through their public entry).
R6 · Tooling
R7 · Dead Code
- Unreachable from the 51 application, 4 tooling and 188 test entry point(s) detected in this repo. Gate removals on `pnpm run build` — an undetected custom entry would make these reachable.
- no import path from any entry point (51 application, 4 tooling, 188 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×2) — scripts/rebuildPlugin.mjs, scripts/reportSize.mjs
R8 · Dependency Hygiene
- Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×2) — packages/transformers/tests/models/chatterbox/test_modeling_chatterbox.js:1, packages/transformers/src/backends/onnx.js:23
What to do
- Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports
- packages/transformers/src/models/auto/tokenization_auto.js → packages/transformers/src/models/tokenizers.js → packages/transformers/src/models/auto/tokenization_auto.js — packages/transformers/src/models/auto/tokenization_auto.js
- packages/transformers/src/models/modeling_utils.js → packages/transformers/src/utils/model_registry/get_model_files.js → packages/transformers/src/utils/model_registry/resolve_model_type.js → packages/transformers/src/models/modeling_utils.js — packages/transformers/src/models/modeling_utils.js
- packages/transformers/src/ops/registry.js → packages/transformers/src/utils/tensor.js → packages/transformers/src/ops/registry.js — packages/transformers/src/ops/registry.js
- packages/transformers/src/utils/hub.js → packages/transformers/src/utils/model_registry/get_file_metadata.js → packages/transformers/src/utils/hub.js — packages/transformers/src/utils/hub.js
What to do
- Break each cycle by extracting the shared piece into a module both sides can import.
X24 · Document value interpolated into markup unescaped
X25 · Inert configuration knob
X29 · Per-element action decided by a fixed element
Reference — by lens
| Lens | Score | Rating | Impact |
|---|---|---|---|
| Code Health | 66% | Adequate — gated by D2, D3 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
| Architecture | 73% | Adequate — gated by D26, R9 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
| Maturity | 64% | Adequate — gated by M2 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
| Readiness | 53% | Adequate — gated by P3, P4 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
| Security | 64% | Adequate — gated by D36 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
| Performance | 60% | Adequate | Strongest area. |
Unscored — 2 check(s) recorded observations but carry no score
- X10 Duplicated predicate — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
- X6 Hand-rolled structured-format parsing — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for
- C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
- C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
- C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
- P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 78 check(s) not relevant to this codebase
- AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
- AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
- AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
- AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
- AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
- AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
- AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
- AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
- AX2 Stateful singletons — Not applicable: TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
- AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
- AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
- AX7 Slice cohesion — not applicable — not a vertical-slice architecture
- AX8 Test isolation — no test/production split to check
- AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
- AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
- AXR1 Runtime accessibility — the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
- C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
- C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
- D11 Test Reliability — No tests discovered
- D16 Bus Factor — single-maintainer repository — bus factor is not applicable
- D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
- D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
- D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
- D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout nor 2+ sibling source directories each declaring an aggregate root. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
- D24 Comment Value — No inline comments to assess — comment value is not applicable here.
- D25 ADR Conformance — no ADRs to check
- D27 Navigability — symbol resolution incomplete — navigability not assessed
- D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
- D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
- D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
- D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
- D4 Code Duplication — This repository's production source (.js, .mjs, .ts) is not read by D4's token comparison, which compares .NET source: duplication in it is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream. Not scored here — read the R10 card for this repository's duplication.
- D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
- D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
- D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
- D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
- D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
- D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the jest suite in packages/transformers/ ran and not one test passed (FAIL tests/utils/maths.test.js), so the coverage would describe the failed run, not the code. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
- DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
- ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
- ED5 Idempotency — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
- ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
- GD1 Unfinished & placeholder code — no source files were read — this check reads C# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
- IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
- P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
- P2 Observability — This repository's JavaScript/TypeScript source (2 module(s), 488 file(s) read) declares no entry point and bootstraps no server, and nothing here deploys a service — it is a library, run inside whatever hosts it, so production observability (structured logging, tracing/metrics, health checks) is N/A. If it grows a binary or a service, the dimension reactivates.
- P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript source, so there is no service whose uptime a failing dependency could take down
- P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
- P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
- PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
- PF2 Allocation hygiene — Not applicable: TypeScript/JavaScript runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
- R5 Dependency Freshness — uses a pnpm lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
- S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
- SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
- X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
- X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
- X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
- X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
- X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
- X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
- X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
- X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
- X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
- X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
- X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
- X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
- X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
- X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
- X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
- X27 Collection changed while being enumerated — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
- X28 Index access outside its own emptiness guard — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
- X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
- X30 Support guard that admits what it rejects — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
- X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
- X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
- X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
- X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
- X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
Critical — 17 finding(s)
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- Import cycle (2 files) packages/transformers/src/models/auto/tokenization_auto.js
- Import cycle (2 files) packages/transformers/src/ops/registry.js
- Import cycle (2 files) packages/transformers/src/utils/hub.js
- REDACTED
- REDACTED
- REDACTED
- Unlisted import '@jest/globals' packages/transformers/tests/models/chatterbox/test_modeling_chatterbox.js:1
- Unlisted import 'onnxruntime-common' packages/transformers/src/backends/onnx.js:23
- Import cycle (3 files) packages/transformers/src/models/modeling_utils.js
Serious — 235 finding(s)
- No test reaches this file packages/transformers/scripts/dev.mjs
- No test reaches this file scripts/dev.mjs
- No test reaches this file packages/transformers-structured-output/scripts/dev.mjs
- No test reaches this file scripts/logger.mjs
- No test reaches this file scripts/rebuildPlugin.mjs
- No test reaches this file packages/transformers/src/generation/parameters.js
- No test reaches this file packages/transformers-structured-output/scripts/build.mjs
- No test reaches this file packages/transformers/scripts/build.mjs
- No test reaches this file scripts/reportSize.mjs
- No test reaches this file scripts/prepareOutDir.mjs
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- FileTooLong: engine/json.ts packages/transformers-structured-output/src/engine/json.ts
- FileTooLong: models/modeling_utils.js packages/transformers/src/models/modeling_utils.js
- FileTooLong: utils/tensor.js packages/transformers/src/utils/tensor.js
- FileTooLong: utils/maths.js packages/transformers/src/utils/maths.js
- Duplicated block with local edits (11 matched lines × 2 locations) packages/transformers/src/models/encodec/feature_extraction_encodec.js:4
- Duplicated block with local edits (11 matched lines × 2 locations) packages/transformers/src/models/m2m_100/tokenization_m2m_100.js:13
- Duplicated block with local edits (11 matched lines × 2 locations) packages/transformers/src/models/m2m_100/tokenization_m2m_100.js:13
- Duplicated block with local edits (11 matched lines × 2 locations) packages/transformers/src/models/mbart/tokenization_mbart.js:3
- Boundary violation [package:relative-cross-package] packages/transformers/scripts/build.mjs:2
- Boundary violation [package:relative-cross-package] packages/transformers/scripts/build.mjs:3
- Boundary violation [package:relative-cross-package] packages/transformers/scripts/dev.mjs:6
- Boundary violation [package:relative-cross-package] packages/transformers/scripts/dev.mjs:7
- Duplicated block (16 lines × 2 locations) packages/transformers/src/models/gemma3/processing_gemma3.js:15
- Duplicated block (16 lines × 2 locations) packages/transformers/src/models/gemma3n/modeling_gemma3n.js:19
- Duplicated block (16 lines × 2 locations) packages/transformers/src/models/granite_speech/processing_granite_speech.js:45
- No assertions: compiles ${file} without errors packages/transformers/tests/types.test.js:65
- No assertions: no progress_total without progress_callback packages/transformers/tests/progress_callbacks.test.js:246
- Sync-over-async blocking packages/transformers/tests/test_utils.js:16
- Sync-over-async blocking packages/transformers/tests/test_utils.js:55
- Duplicated block (15 lines × 2 locations) packages/transformers/src/models/voxtral_realtime/feature_extraction_voxtral_realtime.js:4
- Duplicated block (15 lines × 2 locations) packages/transformers/src/utils/tensor.js:846
- Duplicated block (14 lines × 2 locations) packages/transformers/src/generation/logits_process.js:201
- Duplicated block (14 lines × 2 locations) packages/transformers/src/utils/maths.js:399
- Duplicated block (12 lines × 2 locations) packages/transformers/src/generation/logits_sampler.js:120
- Duplicated block (12 lines × 2 locations) packages/transformers/src/models/chatterbox/feature_extraction_chatterbox.js:10
- Duplicated block (12 lines × 4 locations) packages/transformers/src/models/detr/modeling_detr.js:1
- Duplicated block (12 lines × 4 locations) packages/transformers/src/models/unispeech/modeling_unispeech.js:2
- json.checkSchema (cyclomatic 64) packages/transformers-structured-output/src/engine/json.ts:1568
- WhisperTokenizer._decode_asr (cyclomatic 52) packages/transformers/src/models/whisper/tokenization_whisper.js:29
- spectrogram (cyclomatic 48) packages/transformers/src/utils/audio.js:484
- json.validateObjectNode (cyclomatic 43) packages/transformers-structured-output/src/engine/json.ts:1083
- hub.loadResourceFile (cyclomatic 43) packages/transformers/src/utils/hub.js:265
- json.validateNode (cyclomatic 37) packages/transformers-structured-output/src/engine/json.ts:984
- getCacheNames (cyclomatic 37) packages/transformers/src/configs.js:344
- _call (cyclomatic 35) REDACTED:376
- json.transition (cyclomatic 29) packages/transformers-structured-output/src/engine/json.ts:259
- get_file_metadata._get_file_metadata (cyclomatic 29) packages/transformers/src/utils/model_registry/get_file_metadata.js:59
- constraint.createTokenConstraint (cyclomatic 28) packages/transformers-structured-output/src/engine/constraint.ts:49
- tokenizer.extractTokenizer (cyclomatic 26) packages/transformers-structured-output/src/engine/tokenizer.ts:14
- PreTrainedModel._get_logits_processor (cyclomatic 26) packages/transformers/src/models/modeling_utils.js:404
- preprocess (cyclomatic 26) packages/transformers/src/image_processors_utils.js:921
- json.formatMatches (cyclomatic 25) packages/transformers-structured-output/src/engine/json.ts:1392
- _call (cyclomatic 25) packages/transformers/src/pipelines/image-segmentation.js:68
- WhisperForConditionalGeneration._generate_with_seek (cyclomatic 24) packages/transformers/src/models/whisper/modeling_whisper.js:195
- PreTrainedModel.generate (cyclomatic 23) packages/transformers/src/models/modeling_utils.js:845
- getSession (cyclomatic 23) packages/transformers/src/models/session.js:26
- json.validateArrayNode (cyclomatic 22) packages/transformers-structured-output/src/engine/json.ts:1052
- json.compareDecimal (cyclomatic 19) packages/transformers-structured-output/src/engine/json.ts:1205
- json.validUriText (cyclomatic 19) packages/transformers-structured-output/src/engine/json.ts:1509
- render-api.renderType (cyclomatic 19) packages/transformers/docs/scripts/lib/render-api.mjs:444
- structure.extractEntities (cyclomatic 19) packages/transformers/docs/scripts/lib/structure.mjs:9
- validate.collectDocWarnings (cyclomatic 19) packages/transformers/docs/scripts/lib/validate.mjs:64
- Tensor.slice (cyclomatic 19) packages/transformers/src/utils/tensor.js:416
- ImageProcessor.pad_image (cyclomatic 19) packages/transformers/src/image_processors_utils.js:711
- _call (cyclomatic 19) packages/transformers/src/pipelines/text-generation.js:108
- json.stringByte (cyclomatic 18) packages/transformers-structured-output/src/engine/json.ts:359
- json.unicodeByte (cyclomatic 18) packages/transformers-structured-output/src/engine/json.ts:412
- json.constrainedPropertyKeys (cyclomatic 18) packages/transformers-structured-output/src/engine/json.ts:930
- scan.splitConditional (cyclomatic 18) packages/transformers/docs/scripts/lib/scan.mjs:38
- exports.visitTopLevel (cyclomatic 18) packages/transformers/docs/scripts/lib/exports.mjs:33
- _call_whisper (cyclomatic 18) packages/transformers/src/pipelines/automatic-speech-recognition.js:200
- pipeline (cyclomatic 18) packages/transformers/src/pipelines.js:100
- tokenizer.tokenBytesConverter (cyclomatic 17) packages/transformers-structured-output/src/engine/tokenizer.ts:112
- render-api.renderFunction (cyclomatic 17) packages/transformers/docs/scripts/lib/render-api.mjs:223
- render-api.rewriteConditionals (cyclomatic 17) packages/transformers/docs/scripts/lib/render-api.mjs:587
- WhisperTokenizer.findLongestCommonSequence (cyclomatic 17) packages/transformers/src/models/whisper/tokenization_whisper.js:346
- constructor (cyclomatic 17) packages/transformers/src/image_processors_utils.js:577
- get_resize_output_image_size (cyclomatic 17) packages/transformers/src/image_processors_utils.js:803
- resize (cyclomatic 17) packages/transformers/src/utils/image.js:373
- json.integerScaleReachable (cyclomatic 16) packages/transformers-structured-output/src/engine/json.ts:575
- json.propertySchema (cyclomatic 16) packages/transformers-structured-output/src/engine/json.ts:707
- json.schemaMayAcceptKind (cyclomatic 16) packages/transformers-structured-output/src/engine/json.ts:1264
- streamers.is_chinese_char (cyclomatic 16) packages/transformers/src/generation/streamers.js:26
- ChatterboxModel.forward (cyclomatic 16) packages/transformers/src/models/chatterbox/modeling_chatterbox.js:37
- ensureWasmLoaded (cyclomatic 16) packages/transformers/src/backends/onnx.js:195
- _call (cyclomatic 16) packages/transformers/src/models/lfm2_vl/image_processing_lfm2_vl.js:191
- selectDtype (cyclomatic 16) packages/transformers/src/utils/dtypes.js:85
- getCache (cyclomatic 16) packages/transformers/src/utils/cache.js:22
- Hotspot: packages/transformers/src/utils/hub.js packages/transformers/src/utils/hub.js:265
- WhisperTokenizer._decode_asr (cognitive 151) packages/transformers/src/models/whisper/tokenization_whisper.js:29
- spectrogram (cognitive 75) packages/transformers/src/utils/audio.js:484
- loadResourceFile (cognitive 75) packages/transformers/src/utils/hub.js:265
- _call (cognitive 73) REDACTED:376
- json.checkSchema (cognitive 72) packages/transformers-structured-output/src/engine/json.ts:1568
- json.validateObjectNode (cognitive 62) packages/transformers-structured-output/src/engine/json.ts:1083
- getCacheNames (cognitive 61) packages/transformers/src/configs.js:344
- _get_file_metadata (cognitive 53) packages/transformers/src/utils/model_registry/get_file_metadata.js:59
- validate.collectDocWarnings (cognitive 48) packages/transformers/docs/scripts/lib/validate.mjs:64
- WhisperForConditionalGeneration._generate_with_seek (cognitive 48) packages/transformers/src/models/whisper/modeling_whisper.js:195
- ImageProcessor.pad_image (cognitive 45) packages/transformers/src/image_processors_utils.js:711
- _call (cognitive 45) packages/transformers/src/pipelines/image-segmentation.js:68
- json.validateNode (cognitive 40) packages/transformers-structured-output/src/engine/json.ts:984
- tokenizer.extractTokenizer (cognitive 40) packages/transformers-structured-output/src/engine/tokenizer.ts:14
- PreTrainedModel.generate (cognitive 39) packages/transformers/src/models/modeling_utils.js:845
- preprocess (cognitive 36) packages/transformers/src/image_processors_utils.js:921
- _call_whisper (cognitive 36) packages/transformers/src/pipelines/automatic-speech-recognition.js:200
- image_processors_utils.post_process_object_detection (cognitive 35) packages/transformers/src/image_processors_utils.js:83
- slice (cognitive 35) packages/transformers/src/utils/tensor.js:416
- constraint.createTokenConstraint (cognitive 33) packages/transformers-structured-output/src/engine/constraint.ts:49
- _call (cognitive 32) packages/transformers/src/models/lfm2_vl/image_processing_lfm2_vl.js:191
- json.validateArrayNode (cognitive 29) packages/transformers-structured-output/src/engine/json.ts:1052
- findLongestCommonSequence (cognitive 28) packages/transformers/src/models/whisper/tokenization_whisper.js:346
- json.constrainedPropertyKeys (cognitive 27) packages/transformers-structured-output/src/engine/json.ts:930
- structure.extractEntities (cognitive 27) packages/transformers/docs/scripts/lib/structure.mjs:9
- _get_logits_processor (cognitive 27) packages/transformers/src/models/modeling_utils.js:404
- tasks.parseSupportedTasks (cognitive 26) packages/transformers/docs/scripts/lib/tasks.mjs:28
- validate.formatValidationResult (cognitive 26) packages/transformers/docs/scripts/lib/validate.mjs:30
- SeamlessM4TFeatureExtractor._call (cognitive 26) packages/transformers/src/models/seamless_m4t/feature_extraction_seamless_m4t.js:72
- Phi3VImageProcessor._call (cognitive 26) packages/transformers/src/models/phi3_v/image_processing_phi3_v.js:75
- ChatterboxModel.forward (cognitive 26) packages/transformers/src/models/chatterbox/modeling_chatterbox.js:37
- mask.applyMask (cognitive 25) packages/transformers-structured-output/src/utils/mask.ts:5
- render-api.renderFunction (cognitive 25) packages/transformers/docs/scripts/lib/render-api.mjs:223
- render-api.rewriteConditionals (cognitive 24) packages/transformers/docs/scripts/lib/render-api.mjs:587
- RawImage.center_crop (cognitive 24) packages/transformers/src/utils/image.js:549
- WhisperForConditionalGeneration._extract_token_timestamps (cognitive 24) packages/transformers/src/models/whisper/modeling_whisper.js:381
- json.integerDigitsReachable (cognitive 23) packages/transformers-structured-output/src/engine/json.ts:552
- json.compareDecimal (cognitive 23) packages/transformers-structured-output/src/engine/json.ts:1205
- exports.visitTopLevel (cognitive 23) packages/transformers/docs/scripts/lib/exports.mjs:33
- get_resize_output_image_size (cognitive 23) packages/transformers/src/image_processors_utils.js:803
- getSession (cognitive 23) packages/transformers/src/models/session.js:26
- _call (cognitive 23) packages/transformers/src/pipelines/text-generation.js:108
- selectDtype (cognitive 23) packages/transformers/src/utils/dtypes.js:85
- json.unicodeByte (cognitive 22) packages/transformers-structured-output/src/engine/json.ts:412
- constraint.cachedTokenizer (cognitive 22) packages/transformers-structured-output/src/engine/constraint.ts:163
- pipeline (cognitive 22) packages/transformers/src/pipelines.js:100
- _call (cognitive 22) packages/transformers/src/models/lfm2_vl/processing_lfm2_vl.js:18
- json.propertySchema (cognitive 21) packages/transformers-structured-output/src/engine/json.ts:707
- json.validUriText (cognitive 21) packages/transformers-structured-output/src/engine/json.ts:1509
- scan.splitConditional (cognitive 21) packages/transformers/docs/scripts/lib/scan.mjs:38
- render-api.renderType (cognitive 21) packages/transformers/docs/scripts/lib/render-api.mjs:444
- P2FFT._realTransform4 (cognitive 21) packages/transformers/src/utils/maths.js:581
- tokenization_utils._build_translation_inputs (cognitive 21) REDACTED:811
- ClapFeatureExtractor._get_input_mel (cognitive 21) packages/transformers/src/models/clap/feature_extraction_clap.js:54
- image_processing_lfm2_vl.convert_image_to_patches (cognitive 21) packages/transformers/src/models/lfm2_vl/image_processing_lfm2_vl.js:78
- _call (cognitive 21) packages/transformers/src/models/idefics3/image_processing_idefics3.js:40
- api-links.buildApiSymbolLinks (cognitive 20) packages/transformers/docs/scripts/lib/api-links.mjs:3
- ir.buildTypedefIndex (cognitive 20) packages/transformers/docs/scripts/lib/ir.mjs:37
- validate.validateInternalLinks (cognitive 20) packages/transformers/docs/scripts/lib/validate.mjs:124
- Idefics3ImageProcessor.split_image (cognitive 20) packages/transformers/src/models/idefics3/image_processing_idefics3.js:160
- VitPoseImageProcessor.post_process_pose_estimation (cognitive 20) packages/transformers/src/models/vitpose/image_processing_vitpose.js:18
- json.stringByte (cognitive 19) packages/transformers-structured-output/src/engine/json.ts:359
- resolve_model_type.resolve_model_type (cognitive 19) packages/transformers/src/utils/model_registry/resolve_model_type.js:26
- post_process_semantic_segmentation (cognitive 19) packages/transformers/src/image_processors_utils.js:160
- (anonymous) (cognitive 19) packages/transformers/src/utils/maths.js:1050
- getCache (cognitive 19) packages/transformers/src/utils/cache.js:22
- json.integerScaleReachable (cognitive 18) packages/transformers-structured-output/src/engine/json.ts:575
- tokenizer.tokenBytesConverter (cognitive 18) packages/transformers-structured-output/src/engine/tokenizer.ts:112
- tensor.cat (cognitive 18) packages/transformers/src/utils/tensor.js:1396
- image_processing_gemma4.patchify (cognitive 18) packages/transformers/src/models/gemma4/image_processing_gemma4.js:60
- Qwen2VLForConditionalGeneration._get_multimodal_rope_positions (cognitive 18) packages/transformers/src/models/qwen2_vl/modeling_qwen2_vl.js:108
- PretrainedMixin.from_pretrained (cognitive 18) packages/transformers/src/models/auto/modeling_auto.js:79
- TokenClassificationPipeline._call (cognitive 18) packages/transformers/src/pipelines/token-classification.js:117
- from_pretrained (cognitive 18) packages/transformers/src/models/modeling_utils.js:274
- scan.splitTopLevel (cognitive 17) packages/transformers/docs/scripts/lib/scan.mjs:93
- render-api.renderModule (cognitive 17) packages/transformers/docs/scripts/lib/render-api.mjs:35
- Random.seed (cognitive 17) packages/transformers/src/utils/random.js:66
- json.transition (cognitive 16) packages/transformers-structured-output/src/engine/json.ts:259
- RegexParser.characterClass (cognitive 16) packages/transformers-structured-output/src/engine/regex.ts:103
- maths.dynamic_time_warping (cognitive 16) packages/transformers/src/utils/maths.js:971
- PreTrainedTokenizer.get_chat_template (cognitive 16) REDACTED:662
- WhisperTimeStampLogitsProcessor._call (cognitive 16) packages/transformers/src/generation/logits_process.js:305
- NoBadWordsLogitsProcessor._call (cognitive 16) packages/transformers/src/generation/logits_process.js:588
- image_processing_lfm2_vl.get_target_ratios (cognitive 16) packages/transformers/src/models/lfm2_vl/image_processing_lfm2_vl.js:49
- constructor (cognitive 16) packages/transformers/src/image_processors_utils.js:577
- load_video (cognitive 16) packages/transformers/src/utils/video.js:82
- FunctionTooLong: configs.getNormalizedConfig packages/transformers/src/configs.js:59
- TooManyMethods: Tensor packages/transformers/src/utils/tensor.js:36
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- Coverage not measured — JavaScript/TypeScript suite
- No deployment automation
- Duplication concentrated across 66 sibling directories (63 clone groups) packages/transformers/src/models/dac/modeling_dac.js:6
- Duplicated block (33 lines × 2 locations) packages/transformers/src/models/dac/modeling_dac.js:6
- Duplicated block (31 lines × 2 locations) packages/transformers/src/models/auto/modeling_auto.js:75
- Duplicated block with local edits (26 matched lines × 2 locations) packages/transformers/src/utils/model_registry/clear_cache.js:48
- Duplicated block (25 lines × 2 locations) packages/transformers/src/utils/maths.js:460
- Duplicated block (21 lines × 2 locations) packages/transformers/src/models/idefics3/image_processing_idefics3.js:178
- Duplicated block with local edits (20 matched lines × 2 locations) packages/transformers/src/pipelines/audio-classification.js:71
- Duplicated block with local edits (19 matched lines × 2 locations) packages/transformers/src/generation/logits_process.js:516
- Duplicated block (18 lines × 3 locations) packages/transformers/src/models/audio_spectrogram_transformer/feature_extraction_audio_spectrogram_transformer.js:5
- Duplicated block (18 lines × 2 locations) packages/transformers/src/utils/image.js:248
- Duplicated block (17 lines × 2 locations) packages/transformers/src/models/seamless_m4t/feature_extraction_seamless_m4t.js:33
- Duplicated block (16 lines × 8 locations) packages/transformers/src/models/clap/modeling_clap.js:5
- Duplicated block with local edits (15 matched lines × 2 locations) packages/transformers/src/image_processors_utils.js:1051
- Duplicated block (14 lines × 3 locations) packages/transformers/src/models/dac/modeling_dac.js:6
- Duplicated block with local edits (14 matched lines × 2 locations) packages/transformers/src/models/encodec/feature_extraction_encodec.js:10
- Duplicated block with local edits (13 matched lines × 2 locations) packages/transformers/src/configs.js:520
- Duplicated block (13 lines × 3 locations) packages/transformers/src/generation/logits_process.js:166
- Duplicated block (13 lines × 6 locations) packages/transformers/src/ops/registry.js:49
- Duplicated block with local edits (12 matched lines × 2 locations) packages/transformers/src/models/modeling_utils.js:335
- Duplicated block (11 lines × 3 locations) packages/transformers/src/models/sam/modeling_sam.js:4
- Duplicated block (10 lines × 27 locations) packages/transformers/src/models/albert/modeling_albert.js:2
- Duplicated block with local edits (10 matched lines × 2 locations) packages/transformers/src/models/ultravox/processing_ultravox.js:8
- Duplicated block (10 lines × 2 locations) packages/transformers/src/models/whisper/tokenization_whisper.js:193
- Duplicated block (10 lines × 5 locations) packages/transformers/src/utils/tensor.js:223
- Duplicated block with local edits (9 matched lines × 2 locations) packages/transformers-structured-output/scripts/dev.mjs:9
- Complex function getNormalizedConfig (cyclomatic 120, cognitive 7) packages/transformers/src/configs.js:59
- Complex function checkSchema (cyclomatic 64, cognitive 71) packages/transformers-structured-output/src/engine/json.ts:1568
- Complex function _decode_asr (cyclomatic 52, cognitive 151) packages/transformers/src/models/whisper/tokenization_whisper.js:29
- Complex function spectrogram (cyclomatic 48, cognitive 75) packages/transformers/src/utils/audio.js:484
- Complex function loadResourceFile (cyclomatic 43, cognitive 75) packages/transformers/src/utils/hub.js:265
- Complex function validateObjectNode (cyclomatic 40, cognitive 59) packages/transformers-structured-output/src/engine/json.ts:1083
- Complex function getCacheNames (cyclomatic 37, cognitive 61) packages/transformers/src/configs.js:344
- Complex function validateNode (cyclomatic 36, cognitive 42) packages/transformers-structured-output/src/engine/json.ts:984
- Complex function _call (cyclomatic 32, cognitive 59) REDACTED:376
- Complex function _get_file_metadata (cyclomatic 29, cognitive 53) packages/transformers/src/utils/model_registry/get_file_metadata.js:59
- Complex function transition (cyclomatic 29, cognitive 16) packages/transformers-structured-output/src/engine/json.ts:259
- Complex function extractTokenizer (cyclomatic 26, cognitive 44) packages/transformers-structured-output/src/engine/tokenizer.ts:14
- Complex function preprocess (cyclomatic 26, cognitive 36) packages/transformers/src/image_processors_utils.js:921
- Complex function _get_logits_processor (cyclomatic 26, cognitive 27) packages/transformers/src/models/modeling_utils.js:404
- Complex function formatMatches (cyclomatic 25, cognitive 13) packages/transformers-structured-output/src/engine/json.ts:1392
- Complex function _generate_with_seek (cyclomatic 24, cognitive 48) packages/transformers/src/models/whisper/modeling_whisper.js:195
- Complex function _call (cyclomatic 24, cognitive 44) packages/transformers/src/pipelines/image-segmentation.js:68
- Complex function generate (cyclomatic 23, cognitive 39) packages/transformers/src/models/modeling_utils.js:845
- Complex function validateArrayNode (cyclomatic 23, cognitive 31) packages/transformers-structured-output/src/engine/json.ts:1052
- Complex function getSession (cyclomatic 23, cognitive 23) packages/transformers/src/models/session.js:26
- Dead file (~42 LoC) scripts/rebuildPlugin.mjs
- Dead file (~21 LoC) scripts/reportSize.mjs
Minor — 11 finding(s)
- Split packages/transformers
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- No ADRs
- README/code drift
- No SAST
- No changelog
- Duplicated predicate packages/transformers-structured-output/src/engine/json.ts:1852
- Hand-rolled JSON/XML parsing via regex packages/transformers/docs/scripts/lib/validate.mjs:199
Minor — 1 finding(s)
- Outdated (npm): sharp
Appendix B — Reproduction & audit trail
| Dimension | Tool | Version | Command | Findings | Raw output |
|---|---|---|---|---|---|
| D28 · Secrets (history) | gitleaks | — | gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-12dff38789cd484286898c635329f656/history.json --exit-code 0 --source . | 0 | artifacts/raw/gitleaks-history.json |
| D28 · Secrets (history) | gitleaks | — | gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-12dff38789cd484286898c635329f656/tree.json --exit-code 0 --source . | 0 | artifacts/raw/gitleaks-tree.json |
| D29 · Static Analysis (SAST) | semgrep | — | semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off . | 8 | artifacts/raw/semgrep.json |
| D30 · Dependency Vulnerabilities | trivy | — | trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update | 10 | artifacts/raw/trivy-fs.json |
| D31 · IaC & Container Security | trivy | — | trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan. | 0 | — |
| D32 · Data Compliance (PII/GDPR) | semgrep | — | semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. | 0 | — |
| D37 · Vulnerability-disclosure Policy | disclosure | — | disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed. | 0 | — |
| D40 · Network Egress Confinement | runtime-hardening | — | runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here. | 0 | — |
| D41 · Kernel & Syscall Confinement | runtime-hardening | — | runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here. | 0 | — |
| D42 · Runtime Threat Enforcement | runtime-hardening | — | runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here. | 0 | — |
| D43 · Malicious Dependencies | trivy | — | trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update | 0 | artifacts/raw/trivy-fs.json |