Public report — ironclaw, published 29 Sep 2026.
Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches,
dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase surveyMeasured under the Code Assurance Index · rubric rubric-2026.09.17 (frozen) · verify this surveyFiledcd_30c8c7472827496c8d69aa3661e12d37
Filed 29 September 2026, 01:40 UTC
Public
Very large · 994,027 LoC · 78 projects · rebuild ~12.3 person-years · weakest lens: Readiness (41%)
Findings by grade
68 critical2770 serious68 minor47 could not be resolved — could be critical — see Limitations
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
29 September 2026, 01:20 UTC
A measurement, not a certificate. The Code Assurance Index does not certify,
approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The
standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said
here so the number is checked rather than believed.
Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸
2834findings with an exact file:lineof 2906 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
71/140dimensions across the health lenses994027 LoC · 78 projects — wide & deep
⚠ A critical security finding caps this grade — resolve it before relying on the score below; see the Security lens.
The platform is a massive, high-value asset carrying significant operational risk. With a health score of 50%, the system is stable but fragile under pressure. Rebuilding it would cost nearly €1.8 million and take over a decade of engineering effort, meaning the current codebase holds immense embedded value that must be protected rather than discarded.
The primary danger lies in operational readiness. At 41%, the system lacks the safeguards needed for safe, large-scale operation. Without robust disaster recovery and proper request handling, a single failure could cascade into a major outage. This gap exposes the business to prolonged downtime and data loss, directly threatening service reliability and customer trust. The cost of inaction is high, as every change carries a hidden tax on speed and quality due to code complexity.
Security exposure is the most urgent lever for improvement. Seven leaked secrets were detected, creating immediate vulnerability. Resolving these is a low-effort, high-impact fix that pays for itself within months by preventing potential breaches and reducing the annual drag on engineering velocity. Ignoring this risk means paying a continuous premium in lost productivity and security overhead.
Strengths include excellent domain modeling and event sourcing, which provide a solid foundation for future growth. However, these architectural wins are undermined by weak operational controls. The team should prioritize securing secrets and establishing basic disaster recovery protocols. This focused approach stabilizes the platform, reduces long-term maintenance costs, and ensures the business can scale without fearing catastrophic failure.
How the score is built — each lens's share of the headlineWidth is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
172 finding(s) are new versus the previous scan (2026-09-12) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.
A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.
Rebuild cost & value ~ Modeled — €590,000–€3,000,000
0.7× (at 50% quality) — the last 20% of quality is most of the work
Size & shape
Very large · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
This codebase represents roughly ~12.3 person-years of build effort (about ~€1,800,000 to rebuild). Its weakest lens is Readiness at 41% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.2) — domain model × a 0.7× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Resolve the 7 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (3), REDACTED, REDACTED.
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
Value concentrated against a weak lens · High · Value at risk
This is a Very large asset (~12.3 person-years to rebuild), and its weakest lens is Readiness at 41%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Readiness first — highest risk-reduction per euro on an asset this size.
The top fix pays for itself · High · Economics
The top-ranked fix costs roughly 1–3 engineer-days once. Not doing it costs about 655.4–3932.7 engineer-days every year, paid as drag on the ~8,263,292 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–2 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 3–7% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 2,037,524 line(s) changed over a 90-day window ⇒ ~8,263,292/year · D1/D2/D4 code quality: averaging 6.7/10 ⇒ a 3–7% drag on each change · top-ranked remediation: Low effort ⇒ about 1–3 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 2 months.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Resolve the 7 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (3), REDACTED, REDACTED. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Resolve the 7 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (3), REDACTED, REDACTED.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 6.7/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 3–7% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4 code quality: averaging 6.7/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.
Architecture — module dependency matrix
Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)
1575 modules, 5524 dependencies. 11 dependency cycles across 402 modules, marked above the diagonal.
Showing the 40 most-connected modules; 1535 more are not drawn.
Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
ironclaw_extension_contracts.channel_adapter uses ironclaw_extension_contracts.external. Changing ironclaw_extension_contracts.external can break ironclaw_extension_contracts.channel_adapter, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
10→5 ironclaw_filesystem.record depends on ironclaw_host_api.path✕
Type pairs
1 distinct (type in ironclaw_filesystem.record → type in ironclaw_host_api.path) reference.
ironclaw_host_api.http uses ironclaw_host_api.resource. Changing ironclaw_host_api.resource can break ironclaw_host_api.http, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
16→1 ironclaw_auth.credential depends on ironclaw_auth.ids✕
Type pairs
30 distinct (type in ironclaw_auth.credential → type in ironclaw_auth.ids) references. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
ironclaw_host_api.capability uses ironclaw_host_api.runtime. Changing ironclaw_host_api.runtime can break ironclaw_host_api.capability, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
18→11 ironclaw_host_api.capability depends on ironclaw_host_api.mount✕
Type pairs
1 distinct (type in ironclaw_host_api.capability → type in ironclaw_host_api.mount) reference.
ironclaw_host_api.capability uses ironclaw_host_api.resource. Changing ironclaw_host_api.resource can break ironclaw_host_api.capability, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
18→15 ironclaw_host_api.capability depends on ironclaw_host_api.http✕
Type pairs
1 distinct (type in ironclaw_host_api.capability → type in ironclaw_host_api.http) reference.
ironclaw_host_api.capability uses ironclaw_host_api.decision. Changing ironclaw_host_api.decision can break ironclaw_host_api.capability, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
19→4 ironclaw_extension_registry.package depends on ironclaw_host_api.ids✕
Type pairs
2 distinct (type in ironclaw_extension_registry.package → type in ironclaw_host_api.ids) references.
ironclaw_extension_registry.package uses ironclaw_host_api.ids. Changing ironclaw_host_api.ids can break ironclaw_extension_registry.package, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
19→5 ironclaw_extension_registry.package depends on ironclaw_host_api.path✕
Type pairs
2 distinct (type in ironclaw_extension_registry.package → type in ironclaw_host_api.path) references.
ironclaw_extension_registry.package uses ironclaw_host_api.path. Changing ironclaw_host_api.path can break ironclaw_extension_registry.package, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
19→18 ironclaw_extension_registry.package depends on ironclaw_host_api.capability✕
Type pairs
1 distinct (type in ironclaw_extension_registry.package → type in ironclaw_host_api.capability) reference.
ironclaw_extension_registry.package uses ironclaw_host_api.capability. Changing ironclaw_host_api.capability can break ironclaw_extension_registry.package, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
20→4 ironclaw_host_api.decision depends on ironclaw_host_api.ids✕
Type pairs
3 distinct (type in ironclaw_host_api.decision → type in ironclaw_host_api.ids) references.
ironclaw_host_api.decision uses ironclaw_host_api.capability. Changing ironclaw_host_api.capability can break ironclaw_host_api.decision, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
21→4 ironclaw_host_api.dispatch depends on ironclaw_host_api.ids✕
Type pairs
6 distinct (type in ironclaw_host_api.dispatch → type in ironclaw_host_api.ids) references.
ironclaw_host_api.dispatch uses ironclaw_host_api.capability. Changing ironclaw_host_api.capability can break ironclaw_host_api.dispatch, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
21→20 ironclaw_host_api.dispatch depends on ironclaw_host_api.decision✕
Type pairs
1 distinct (type in ironclaw_host_api.dispatch → type in ironclaw_host_api.decision) reference.
ironclaw_host_runtime.first_party uses ironclaw_host_api.ids. Changing ironclaw_host_api.ids can break ironclaw_host_runtime.first_party, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
23→11 ironclaw_host_runtime.first_party depends on ironclaw_host_api.mount✕
Type pairs
1 distinct (type in ironclaw_host_runtime.first_party → type in ironclaw_host_api.mount) reference.
ironclaw_host_runtime.first_party uses ironclaw_host_api.mount. Changing ironclaw_host_api.mount can break ironclaw_host_runtime.first_party, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
23→12 ironclaw_host_runtime.first_party depends on ironclaw_host_api.resource✕
Type pairs
4 distinct (type in ironclaw_host_runtime.first_party → type in ironclaw_host_api.resource) references.
ironclaw_host_runtime.first_party uses ironclaw_host_api.resource. Changing ironclaw_host_api.resource can break ironclaw_host_runtime.first_party, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
23→18 ironclaw_host_runtime.first_party depends on ironclaw_host_api.capability✕
Type pairs
1 distinct (type in ironclaw_host_runtime.first_party → type in ironclaw_host_api.capability) reference.
ironclaw_host_runtime.first_party uses ironclaw_host_api.capability. Changing ironclaw_host_api.capability can break ironclaw_host_runtime.first_party, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
23→20 ironclaw_host_runtime.first_party depends on ironclaw_host_api.decision✕
Type pairs
1 distinct (type in ironclaw_host_runtime.first_party → type in ironclaw_host_api.decision) reference.
ironclaw_host_runtime.first_party uses ironclaw_host_api.decision. Changing ironclaw_host_api.decision can break ironclaw_host_runtime.first_party, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
23→21 ironclaw_host_runtime.first_party depends on ironclaw_host_api.dispatch✕
Type pairs
3 distinct (type in ironclaw_host_runtime.first_party → type in ironclaw_host_api.dispatch) references.
ironclaw_host_runtime.first_party uses ironclaw_host_api.dispatch. Changing ironclaw_host_api.dispatch can break ironclaw_host_runtime.first_party, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
24→4 ironclaw_loop_contracts.host.run_context depends on ironclaw_host_api.ids✕
Type pairs
2 distinct (type in ironclaw_loop_contracts.host.run_context → type in ironclaw_host_api.ids) references.
ironclaw_loop_contracts.host.run_context uses ironclaw_host_api.ids. Changing ironclaw_host_api.ids can break ironclaw_loop_contracts.host.run_context, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
24→12 ironclaw_loop_contracts.host.run_context depends on ironclaw_host_api.resource✕
Type pairs
1 distinct (type in ironclaw_loop_contracts.host.run_context → type in ironclaw_host_api.resource) reference.
ironclaw_loop_contracts.host.run_context uses ironclaw_host_api.resource. Changing ironclaw_host_api.resource can break ironclaw_loop_contracts.host.run_context, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
24→22 ironclaw_loop_contracts.host.run_context depends on ironclaw_host_api.turn✕
Type pairs
7 distinct (type in ironclaw_loop_contracts.host.run_context → type in ironclaw_host_api.turn) references.
ironclaw_loop_contracts.host.run_context uses ironclaw_host_api.turn. Changing ironclaw_host_api.turn can break ironclaw_loop_contracts.host.run_context, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
24→33 ironclaw_loop_contracts.host.run_context depends on ironclaw_loop_contracts.host.modelcycle✕
Type pairs
1 distinct (type in ironclaw_loop_contracts.host.run_context → type in ironclaw_loop_contracts.host.model) reference.
ironclaw_loop_contracts.host.run_context uses ironclaw_loop_contracts.host.model. Changing ironclaw_loop_contracts.host.model can break ironclaw_loop_contracts.host.run_context, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
25→4 ironclaw_processes.journal depends on ironclaw_host_api.ids✕
Type pairs
39 distinct (type in ironclaw_processes.journal → type in ironclaw_host_api.ids) references. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
ironclaw_processes.journal uses ironclaw_host_api.ids. Changing ironclaw_host_api.ids can break ironclaw_processes.journal, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
25→12 ironclaw_processes.journal depends on ironclaw_host_api.resource✕
Type pairs
31 distinct (type in ironclaw_processes.journal → type in ironclaw_host_api.resource) references. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
ironclaw_product_contracts.surface uses ironclaw_host_api.ids. Changing ironclaw_host_api.ids can break ironclaw_product_contracts.surface, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
26→9 ironclaw_product_contracts.surface depends on ironclaw_extension_contracts.channel_adapter✕
Type pairs
1 distinct (type in ironclaw_product_contracts.surface → type in ironclaw_extension_contracts.channel_adapter) reference.
ironclaw_product_contracts.surface uses ironclaw_extension_contracts.channel_adapter. Changing ironclaw_extension_contracts.channel_adapter can break ironclaw_product_contracts.surface, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
26→22 ironclaw_product_contracts.surface depends on ironclaw_host_api.turn✕
Type pairs
2 distinct (type in ironclaw_product_contracts.surface → type in ironclaw_host_api.turn) references.
ironclaw_product_contracts.surface uses ironclaw_host_api.turn. Changing ironclaw_host_api.turn can break ironclaw_product_contracts.surface, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
26→30 ironclaw_product_contracts.surface depends on ironclaw_product_contracts.inboundcycle✕
Type pairs
5 distinct (type in ironclaw_product_contracts.surface → type in ironclaw_product_contracts.inbound) references.
ironclaw_product_contracts.surface uses ironclaw_product_contracts.inbound. Changing ironclaw_product_contracts.inbound can break ironclaw_product_contracts.surface, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
27→4 ironclaw_threads.contract depends on ironclaw_host_api.ids✕
Type pairs
36 distinct (type in ironclaw_threads.contract → type in ironclaw_host_api.ids) references. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
ironclaw_auth.product_auth.api.auth uses ironclaw_host_api.ids. Changing ironclaw_host_api.ids can break ironclaw_auth.product_auth.api.auth, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→13 ironclaw_auth.product_auth.api.auth depends on ironclaw_auth.scope✕
Type pairs
6 distinct (type in ironclaw_auth.product_auth.api.auth → type in ironclaw_auth.scope) references.
ironclaw_auth.product_auth.api.auth uses ironclaw_auth.scope. Changing ironclaw_auth.scope can break ironclaw_auth.product_auth.api.auth, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→16 ironclaw_auth.product_auth.api.auth depends on ironclaw_auth.credential✕
Type pairs
6 distinct (type in ironclaw_auth.product_auth.api.auth → type in ironclaw_auth.credential) references.
ironclaw_auth.product_auth.api.auth uses ironclaw_auth.credential. Changing ironclaw_auth.credential can break ironclaw_auth.product_auth.api.auth, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→22 ironclaw_auth.product_auth.api.auth depends on ironclaw_host_api.turn✕
Type pairs
2 distinct (type in ironclaw_auth.product_auth.api.auth → type in ironclaw_host_api.turn) references.
ironclaw_auth.product_auth.api.auth uses ironclaw_host_api.turn. Changing ironclaw_host_api.turn can break ironclaw_auth.product_auth.api.auth, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→26 ironclaw_auth.product_auth.api.auth depends on ironclaw_product_contracts.surface✕
Type pairs
1 distinct (type in ironclaw_auth.product_auth.api.auth → type in ironclaw_product_contracts.surface) reference.
ironclaw_auth.product_auth.api.auth uses ironclaw_product_contracts.surface. Changing ironclaw_product_contracts.surface can break ironclaw_auth.product_auth.api.auth, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
29→24 ironclaw_loop_contracts.host.refs depends on ironclaw_loop_contracts.host.run_context✕
Type pairs
2 distinct (type in ironclaw_loop_contracts.host.refs → type in ironclaw_loop_contracts.host.run_context) references.
ironclaw_loop_contracts.host.refs uses ironclaw_loop_contracts.host.run_context. Changing ironclaw_loop_contracts.host.run_context can break ironclaw_loop_contracts.host.refs, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→2 ironclaw_product_contracts.inbound depends on ironclaw_extension_contracts.external✕
Type pairs
8 distinct (type in ironclaw_product_contracts.inbound → type in ironclaw_extension_contracts.external) references.
ironclaw_product_contracts.inbound uses ironclaw_extension_contracts.external. Changing ironclaw_extension_contracts.external can break ironclaw_product_contracts.inbound, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→4 ironclaw_product_contracts.inbound depends on ironclaw_host_api.ids✕
Type pairs
1 distinct (type in ironclaw_product_contracts.inbound → type in ironclaw_host_api.ids) reference.
ironclaw_product_contracts.inbound uses ironclaw_host_api.ids. Changing ironclaw_host_api.ids can break ironclaw_product_contracts.inbound, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→6 ironclaw_product_contracts.inbound depends on ironclaw_host_api.product_adapter.identity✕
Type pairs
4 distinct (type in ironclaw_product_contracts.inbound → type in ironclaw_host_api.product_adapter.identity) references.
ironclaw_product_contracts.inbound uses ironclaw_host_api.product_adapter.identity. Changing ironclaw_host_api.product_adapter.identity can break ironclaw_product_contracts.inbound, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→9 ironclaw_product_contracts.inbound depends on ironclaw_extension_contracts.channel_adapter✕
Type pairs
11 distinct (type in ironclaw_product_contracts.inbound → type in ironclaw_extension_contracts.channel_adapter) references.
ironclaw_product_contracts.inbound uses ironclaw_extension_contracts.channel_adapter. Changing ironclaw_extension_contracts.channel_adapter can break ironclaw_product_contracts.inbound, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→22 ironclaw_product_contracts.inbound depends on ironclaw_host_api.turn✕
Type pairs
4 distinct (type in ironclaw_product_contracts.inbound → type in ironclaw_host_api.turn) references.
ironclaw_product_contracts.inbound uses ironclaw_host_api.turn. Changing ironclaw_host_api.turn can break ironclaw_product_contracts.inbound, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→26 ironclaw_product_contracts.inbound depends on ironclaw_product_contracts.surface✕
Type pairs
2 distinct (type in ironclaw_product_contracts.inbound → type in ironclaw_product_contracts.surface) references.
ironclaw_product_contracts.inbound uses ironclaw_product_contracts.surface. Changing ironclaw_product_contracts.surface can break ironclaw_product_contracts.inbound, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→4 ironclaw_composition.input depends on ironclaw_host_api.ids✕
Type pairs
6 distinct (type in ironclaw_composition.input → type in ironclaw_host_api.ids) references.
ironclaw_composition.input uses ironclaw_extension_contracts.channel_adapter. Changing ironclaw_extension_contracts.channel_adapter can break ironclaw_composition.input, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→25 ironclaw_composition.input depends on ironclaw_processes.journal✕
Type pairs
1 distinct (type in ironclaw_composition.input → type in ironclaw_processes.journal) reference.
ironclaw_composition.input uses ironclaw_auth.product_auth.api.auth. Changing ironclaw_auth.product_auth.api.auth can break ironclaw_composition.input, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→3 ironclaw_host_runtime.services depends on ironclaw_host_api.action✕
Type pairs
1 distinct (type in ironclaw_host_runtime.services → type in ironclaw_host_api.action) reference.
ironclaw_host_runtime.services uses ironclaw_host_api.action. Changing ironclaw_host_api.action can break ironclaw_host_runtime.services, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→4 ironclaw_host_runtime.services depends on ironclaw_host_api.ids✕
Type pairs
4 distinct (type in ironclaw_host_runtime.services → type in ironclaw_host_api.ids) references.
ironclaw_host_runtime.services uses ironclaw_host_api.runtime. Changing ironclaw_host_api.runtime can break ironclaw_host_runtime.services, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→12 ironclaw_host_runtime.services depends on ironclaw_host_api.resource✕
Type pairs
2 distinct (type in ironclaw_host_runtime.services → type in ironclaw_host_api.resource) references.
ironclaw_host_runtime.services uses ironclaw_host_api.resource. Changing ironclaw_host_api.resource can break ironclaw_host_runtime.services, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→17 ironclaw_host_runtime.services depends on ironclaw_filesystem.scoped✕
Type pairs
1 distinct (type in ironclaw_host_runtime.services → type in ironclaw_filesystem.scoped) reference.
ironclaw_host_runtime.services uses ironclaw_filesystem.scoped. Changing ironclaw_filesystem.scoped can break ironclaw_host_runtime.services, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→18 ironclaw_host_runtime.services depends on ironclaw_host_api.capability✕
Type pairs
1 distinct (type in ironclaw_host_runtime.services → type in ironclaw_host_api.capability) reference.
ironclaw_host_runtime.services uses ironclaw_host_api.capability. Changing ironclaw_host_api.capability can break ironclaw_host_runtime.services, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→23 ironclaw_host_runtime.services depends on ironclaw_host_runtime.first_party✕
Type pairs
1 distinct (type in ironclaw_host_runtime.services → type in ironclaw_host_runtime.first_party) reference.
ironclaw_host_runtime.services uses ironclaw_host_runtime.first_party. Changing ironclaw_host_runtime.first_party can break ironclaw_host_runtime.services, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→29 ironclaw_host_runtime.services depends on ironclaw_loop_contracts.host.refs✕
Type pairs
1 distinct (type in ironclaw_host_runtime.services → type in ironclaw_loop_contracts.host.refs) reference.
ironclaw_host_runtime.services uses ironclaw_loop_contracts.host.refs. Changing ironclaw_loop_contracts.host.refs can break ironclaw_host_runtime.services, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→4 ironclaw_loop_contracts.host.model depends on ironclaw_host_api.ids✕
Type pairs
2 distinct (type in ironclaw_loop_contracts.host.model → type in ironclaw_host_api.ids) references.
ironclaw_loop_contracts.host.model uses ironclaw_host_api.ids. Changing ironclaw_host_api.ids can break ironclaw_loop_contracts.host.model, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→22 ironclaw_loop_contracts.host.model depends on ironclaw_host_api.turn✕
Type pairs
3 distinct (type in ironclaw_loop_contracts.host.model → type in ironclaw_host_api.turn) references.
ironclaw_loop_contracts.host.model uses ironclaw_host_api.turn. Changing ironclaw_host_api.turn can break ironclaw_loop_contracts.host.model, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→24 ironclaw_loop_contracts.host.model depends on ironclaw_loop_contracts.host.run_context✕
Type pairs
1 distinct (type in ironclaw_loop_contracts.host.model → type in ironclaw_loop_contracts.host.run_context) reference.
ironclaw_loop_contracts.host.model uses ironclaw_loop_contracts.host.run_context. Changing ironclaw_loop_contracts.host.run_context can break ironclaw_loop_contracts.host.model, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→29 ironclaw_loop_contracts.host.model depends on ironclaw_loop_contracts.host.refs✕
Type pairs
11 distinct (type in ironclaw_loop_contracts.host.model → type in ironclaw_loop_contracts.host.refs) references.
ironclaw_loop_contracts.host.model uses ironclaw_loop_contracts.host.refs. Changing ironclaw_loop_contracts.host.refs can break ironclaw_loop_contracts.host.model, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→39 ironclaw_loop_contracts.host.model depends on ironclaw_loop_contracts.host.capabilitycycle✕
Type pairs
1 distinct (type in ironclaw_loop_contracts.host.model → type in ironclaw_loop_contracts.host.capability) reference.
ironclaw_loop_contracts.host.model uses ironclaw_loop_contracts.host.capability. Changing ironclaw_loop_contracts.host.capability can break ironclaw_loop_contracts.host.model, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
34→4 ironclaw_composition.factory depends on ironclaw_host_api.ids✕
Type pairs
6 distinct (type in ironclaw_composition.factory → type in ironclaw_host_api.ids) references.
ironclaw_composition.factory uses ironclaw_host_api.runtime. Changing ironclaw_host_api.runtime can break ironclaw_composition.factory, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→11 ironclaw_composition.factory depends on ironclaw_host_api.mount✕
Type pairs
1 distinct (type in ironclaw_composition.factory → type in ironclaw_host_api.mount) reference.
ironclaw_composition.factory uses ironclaw_host_api.resource. Changing ironclaw_host_api.resource can break ironclaw_composition.factory, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→17 ironclaw_composition.factory depends on ironclaw_filesystem.scoped✕
Type pairs
2 distinct (type in ironclaw_composition.factory → type in ironclaw_filesystem.scoped) references.
ironclaw_composition.factory uses ironclaw_filesystem.scoped. Changing ironclaw_filesystem.scoped can break ironclaw_composition.factory, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→19 ironclaw_composition.factory depends on ironclaw_extension_registry.package✕
Type pairs
1 distinct (type in ironclaw_composition.factory → type in ironclaw_extension_registry.package) reference.
ironclaw_composition.factory uses ironclaw_extension_registry.package. Changing ironclaw_extension_registry.package can break ironclaw_composition.factory, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→28 ironclaw_composition.factory depends on ironclaw_auth.product_auth.api.auth✕
Type pairs
1 distinct (type in ironclaw_composition.factory → type in ironclaw_auth.product_auth.api.auth) reference.
ironclaw_composition.factory uses ironclaw_auth.product_auth.api.auth. Changing ironclaw_auth.product_auth.api.auth can break ironclaw_composition.factory, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→31 ironclaw_composition.factory depends on ironclaw_composition.input✕
Type pairs
4 distinct (type in ironclaw_composition.factory → type in ironclaw_composition.input) references.
ironclaw_composition.factory uses ironclaw_composition.input. Changing ironclaw_composition.input can break ironclaw_composition.factory, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
35→22 ironclaw_loop_contracts.host.error depends on ironclaw_host_api.turn✕
Type pairs
1 distinct (type in ironclaw_loop_contracts.host.error → type in ironclaw_host_api.turn) reference.
ironclaw_loop_contracts.host.error uses ironclaw_host_api.turn. Changing ironclaw_host_api.turn can break ironclaw_loop_contracts.host.error, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
35→33 ironclaw_loop_contracts.host.error depends on ironclaw_loop_contracts.host.model✕
Type pairs
1 distinct (type in ironclaw_loop_contracts.host.error → type in ironclaw_loop_contracts.host.model) reference.
ironclaw_loop_contracts.host.error uses ironclaw_loop_contracts.host.model. Changing ironclaw_loop_contracts.host.model can break ironclaw_loop_contracts.host.error, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
36→20 ironclaw_turns.status depends on ironclaw_host_api.decision✕
Type pairs
1 distinct (type in ironclaw_turns.status → type in ironclaw_host_api.decision) reference.
ironclaw_turns.status uses ironclaw_loop_contracts.host.run_context. Changing ironclaw_loop_contracts.host.run_context can break ironclaw_turns.status, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
36→25 ironclaw_turns.status depends on ironclaw_processes.journal✕
Type pairs
1 distinct (type in ironclaw_turns.status → type in ironclaw_processes.journal) reference.
ironclaw_turns.status uses ironclaw_loop_contracts.host.model. Changing ironclaw_loop_contracts.host.model can break ironclaw_turns.status, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→1 ironclaw_assistant.reborn_services depends on ironclaw_auth.ids✕
Type pairs
3 distinct (type in ironclaw_assistant.reborn_services → type in ironclaw_auth.ids) references.
ironclaw_assistant.reborn_services uses ironclaw_auth.ids. Changing ironclaw_auth.ids can break ironclaw_assistant.reborn_services, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→4 ironclaw_assistant.reborn_services depends on ironclaw_host_api.ids✕
Type pairs
26 distinct (type in ironclaw_assistant.reborn_services → type in ironclaw_host_api.ids) references. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
ironclaw_assistant.reborn_services uses ironclaw_host_api.ids. Changing ironclaw_host_api.ids can break ironclaw_assistant.reborn_services, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→8 ironclaw_assistant.reborn_services depends on ironclaw_product_contracts.package_lifecycle✕
Type pairs
2 distinct (type in ironclaw_assistant.reborn_services → type in ironclaw_product_contracts.package_lifecycle) references.
ironclaw_assistant.reborn_services uses ironclaw_product_contracts.package_lifecycle. Changing ironclaw_product_contracts.package_lifecycle can break ironclaw_assistant.reborn_services, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→12 ironclaw_assistant.reborn_services depends on ironclaw_host_api.resource✕
Type pairs
1 distinct (type in ironclaw_assistant.reborn_services → type in ironclaw_host_api.resource) reference.
ironclaw_assistant.reborn_services uses ironclaw_host_api.resource. Changing ironclaw_host_api.resource can break ironclaw_assistant.reborn_services, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→13 ironclaw_assistant.reborn_services depends on ironclaw_auth.scope✕
Type pairs
2 distinct (type in ironclaw_assistant.reborn_services → type in ironclaw_auth.scope) references.
ironclaw_assistant.reborn_services uses ironclaw_auth.scope. Changing ironclaw_auth.scope can break ironclaw_assistant.reborn_services, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→18 ironclaw_assistant.reborn_services depends on ironclaw_host_api.capability✕
Type pairs
1 distinct (type in ironclaw_assistant.reborn_services → type in ironclaw_host_api.capability) reference.
ironclaw_assistant.reborn_services uses ironclaw_host_api.capability. Changing ironclaw_host_api.capability can break ironclaw_assistant.reborn_services, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→22 ironclaw_assistant.reborn_services depends on ironclaw_host_api.turn✕
Type pairs
15 distinct (type in ironclaw_assistant.reborn_services → type in ironclaw_host_api.turn) references.
ironclaw_assistant.reborn_services uses ironclaw_host_api.turn. Changing ironclaw_host_api.turn can break ironclaw_assistant.reborn_services, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→26 ironclaw_assistant.reborn_services depends on ironclaw_product_contracts.surface✕
Type pairs
23 distinct (type in ironclaw_assistant.reborn_services → type in ironclaw_product_contracts.surface) references.
ironclaw_assistant.reborn_services uses ironclaw_product_contracts.surface. Changing ironclaw_product_contracts.surface can break ironclaw_assistant.reborn_services, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→27 ironclaw_assistant.reborn_services depends on ironclaw_threads.contract✕
Type pairs
6 distinct (type in ironclaw_assistant.reborn_services → type in ironclaw_threads.contract) references.
ironclaw_assistant.reborn_services uses ironclaw_threads.contract. Changing ironclaw_threads.contract can break ironclaw_assistant.reborn_services, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→30 ironclaw_assistant.reborn_services depends on ironclaw_product_contracts.inbound✕
Type pairs
1 distinct (type in ironclaw_assistant.reborn_services → type in ironclaw_product_contracts.inbound) reference.
ironclaw_assistant.reborn_services uses ironclaw_product_contracts.inbound. Changing ironclaw_product_contracts.inbound can break ironclaw_assistant.reborn_services, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→36 ironclaw_assistant.reborn_services depends on ironclaw_turns.status✕
Type pairs
1 distinct (type in ironclaw_assistant.reborn_services → type in ironclaw_turns.status) reference.
ironclaw_assistant.reborn_services uses ironclaw_turns.status. Changing ironclaw_turns.status can break ironclaw_assistant.reborn_services, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
38→4 ironclaw_composition.runtime depends on ironclaw_host_api.ids✕
Type pairs
10 distinct (type in ironclaw_composition.runtime → type in ironclaw_host_api.ids) references.
ironclaw_composition.runtime uses ironclaw_host_api.resource. Changing ironclaw_host_api.resource can break ironclaw_composition.runtime, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
38→17 ironclaw_composition.runtime depends on ironclaw_filesystem.scoped✕
Type pairs
2 distinct (type in ironclaw_composition.runtime → type in ironclaw_filesystem.scoped) references.
ironclaw_composition.runtime uses ironclaw_filesystem.scoped. Changing ironclaw_filesystem.scoped can break ironclaw_composition.runtime, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
38→19 ironclaw_composition.runtime depends on ironclaw_extension_registry.package✕
Type pairs
1 distinct (type in ironclaw_composition.runtime → type in ironclaw_extension_registry.package) reference.
ironclaw_composition.runtime uses ironclaw_extension_registry.package. Changing ironclaw_extension_registry.package can break ironclaw_composition.runtime, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
38→22 ironclaw_composition.runtime depends on ironclaw_host_api.turn✕
Type pairs
12 distinct (type in ironclaw_composition.runtime → type in ironclaw_host_api.turn) references.
ironclaw_composition.runtime uses ironclaw_loop_contracts.host.run_context. Changing ironclaw_loop_contracts.host.run_context can break ironclaw_composition.runtime, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
38→27 ironclaw_composition.runtime depends on ironclaw_threads.contract✕
Type pairs
2 distinct (type in ironclaw_composition.runtime → type in ironclaw_threads.contract) references.
ironclaw_composition.runtime uses ironclaw_threads.contract. Changing ironclaw_threads.contract can break ironclaw_composition.runtime, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
38→28 ironclaw_composition.runtime depends on ironclaw_auth.product_auth.api.auth✕
Type pairs
2 distinct (type in ironclaw_composition.runtime → type in ironclaw_auth.product_auth.api.auth) references.
ironclaw_composition.runtime uses ironclaw_auth.product_auth.api.auth. Changing ironclaw_auth.product_auth.api.auth can break ironclaw_composition.runtime, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
38→34 ironclaw_composition.runtime depends on ironclaw_composition.factory✕
Type pairs
1 distinct (type in ironclaw_composition.runtime → type in ironclaw_composition.factory) reference.
ironclaw_composition.runtime uses ironclaw_composition.factory. Changing ironclaw_composition.factory can break ironclaw_composition.runtime, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
38→36 ironclaw_composition.runtime depends on ironclaw_turns.status✕
Type pairs
1 distinct (type in ironclaw_composition.runtime → type in ironclaw_turns.status) reference.
ironclaw_loop_contracts.host.capability uses ironclaw_host_api.ids. Changing ironclaw_host_api.ids can break ironclaw_loop_contracts.host.capability, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
39→7 ironclaw_loop_contracts.host.capability depends on ironclaw_host_api.runtime✕
Type pairs
1 distinct (type in ironclaw_loop_contracts.host.capability → type in ironclaw_host_api.runtime) reference.
ironclaw_loop_contracts.host.capability uses ironclaw_host_api.runtime. Changing ironclaw_host_api.runtime can break ironclaw_loop_contracts.host.capability, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
39→18 ironclaw_loop_contracts.host.capability depends on ironclaw_host_api.capability✕
Type pairs
2 distinct (type in ironclaw_loop_contracts.host.capability → type in ironclaw_host_api.capability) references.
ironclaw_loop_contracts.host.capability uses ironclaw_host_api.capability. Changing ironclaw_host_api.capability can break ironclaw_loop_contracts.host.capability, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
39→22 ironclaw_loop_contracts.host.capability depends on ironclaw_host_api.turn✕
Type pairs
5 distinct (type in ironclaw_loop_contracts.host.capability → type in ironclaw_host_api.turn) references.
ironclaw_loop_contracts.host.capability uses ironclaw_host_api.turn. Changing ironclaw_host_api.turn can break ironclaw_loop_contracts.host.capability, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
39→29 ironclaw_loop_contracts.host.capability depends on ironclaw_loop_contracts.host.refs✕
Type pairs
6 distinct (type in ironclaw_loop_contracts.host.capability → type in ironclaw_loop_contracts.host.refs) references.
ironclaw_loop_contracts.host.capability uses ironclaw_loop_contracts.host.refs. Changing ironclaw_loop_contracts.host.refs can break ironclaw_loop_contracts.host.capability, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
39→35 ironclaw_loop_contracts.host.capability depends on ironclaw_loop_contracts.host.error✕
Type pairs
1 distinct (type in ironclaw_loop_contracts.host.capability → type in ironclaw_loop_contracts.host.error) reference.
ironclaw_loop_contracts.host.capability uses ironclaw_loop_contracts.host.error. Changing ironclaw_loop_contracts.host.error can break ironclaw_loop_contracts.host.capability, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
40→4 ironclaw_agent_loop.state depends on ironclaw_host_api.ids✕
Type pairs
5 distinct (type in ironclaw_agent_loop.state → type in ironclaw_host_api.ids) references.
ironclaw_agent_loop.state uses ironclaw_loop_contracts.host.run_context. Changing ironclaw_loop_contracts.host.run_context can break ironclaw_agent_loop.state, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
40→29 ironclaw_agent_loop.state depends on ironclaw_loop_contracts.host.refs✕
Type pairs
9 distinct (type in ironclaw_agent_loop.state → type in ironclaw_loop_contracts.host.refs) references.
ironclaw_agent_loop.state uses ironclaw_loop_contracts.host.refs. Changing ironclaw_loop_contracts.host.refs can break ironclaw_agent_loop.state, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
40→33 ironclaw_agent_loop.state depends on ironclaw_loop_contracts.host.model✕
Type pairs
1 distinct (type in ironclaw_agent_loop.state → type in ironclaw_loop_contracts.host.model) reference.
ironclaw_agent_loop.state uses ironclaw_loop_contracts.host.model. Changing ironclaw_loop_contracts.host.model can break ironclaw_agent_loop.state, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
40→39 ironclaw_agent_loop.state depends on ironclaw_loop_contracts.host.capability✕
Type pairs
5 distinct (type in ironclaw_agent_loop.state → type in ironclaw_loop_contracts.host.capability) references.
ironclaw_agent_loop.state uses ironclaw_loop_contracts.host.capability. Changing ironclaw_loop_contracts.host.capability can break ironclaw_agent_loop.state, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A03:2021 — Injection
27
High / Critical
A06:2021 — Vulnerable & Outdated Components
21
High / Critical
A02:2021 — Cryptographic Failures
18
High / Critical
A05:2021 — Security Misconfiguration
8
High / Critical
Roadmap
Immediately resolve the seven leaked secrets, prioritizing the three instances in REDACTED, while codifying disaster recovery by documenting RTO/RPO and restore procedures in infrastructure as code. Strengthen system resilience by enforcing request timeouts on all HTTP clients and implementing retry logic with back-off for transient failures. Finally, extend structured logging to all remaining runnable modules to ensure full production diagnosability and update outdated dependencies to maintain hygiene.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 7 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (3), REDACTED, REDACTED.
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
God Classes: FileTooLong: root/product_live_adapters.rs
REDACTED
5.8
Mixed
Static Analysis (SAST): High: REDACTED
How the grades work
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 68
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.
Serious — 2770
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.
Minor — 68
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 47
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. 67 of 71 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.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 71 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
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, 2834 of 2906 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
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.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D6 Cohesion (LCOM4) — 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's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D10 Test Quality — 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. The 1,518 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 910 test source file(s) (.rs, .py) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
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 MEASURED: the JavaScript/TypeScript suite could not be re-run in the analyzer sandbox — the dependency install for crates/product/ironclaw_webui/frontend/ failed in the analyzer sandbox (ERR_PNPM_UNSUPPORTED_ENGINE Unsupported environment (bad pnpm and/or Node.js version)), so the suite never ran. This is OUR limitation, not a defect in the repo — it is excluded from the score.
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 for the vitest suite in crates/product/ironclaw_webui/frontend/ was NOT MEASURED: the dependency install for crates/product/ironclaw_webui/frontend/ failed in the analyzer sandbox (ERR_PNPM_UNSUPPORTED_ENGINE Unsupported environment (bad pnpm and/or Node.js version)), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D15 Churn × Complexity Hotspots — 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. A hotspot's complexity is meant to be the worst body its churn actually touched. For crates/contracts/ironclaw_host_api/src/result_meta.rs, src/lib.rs that could not be established — the complexity reader for the file reports no body extents, or the history carries no per-line attribution — so the row quotes the file's worst body, which the counted changes may never have touched. The churn count is unaffected.
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 (Cargo.toml), 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.
D32 Data Compliance (PII/GDPR) — 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. `crates/product/ironclaw_webui/frontend/src/components/command-palette.stories.tsx`, `crates/product/ironclaw_webui/frontend/src/components/notification-center.stories.tsx`, `crates/product/ironclaw_webui/frontend/src/components/page-header.stories.tsx`, `crates/product/ironclaw_webui/frontend/src/components/pairing-web-code-panel.stories.tsx`, `crates/product/ironclaw_webui/frontend/src/components/sidebar-footer.stories.tsx`, … (+27 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
AX1 Captive dependencies — 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.
AX2 Stateful singletons — 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.
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.
C1 Data Protection — 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 personal data 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 personal data controls.
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.
P10 Library API & versioning — 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 NuGet packaging and C# public API only, and no .NET project was loaded for 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.
PF1 Benchmark discipline — 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.
PF2 Allocation hygiene — 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.
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. 50 further occurrence(s) are not listed individually; the score already reflects all 90.
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.
X10 Duplicated predicate — 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.
X24 Document value interpolated into markup unescaped — 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.
X25 Inert configuration knob — 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.
X26 Unsynchronised callback handoff — 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 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.
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 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.
X29 Per-element action decided by a fixed element — 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.
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 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.
X32 Type resolved by simple name across every loaded assembly — 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.
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.
X6 Hand-rolled structured-format parsing — 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.
X7 Silent fallback defaults — 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.
Repo exclusion declarations: 1 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
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
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
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.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
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 REDACTED Scanning: REDACTED 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").
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.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
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.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
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.
D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts — leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
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.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
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.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
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.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
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".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
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
LLM-set scores this run (4): D19, D20, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
312 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was useChat.useChat at 170. A further 54 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 ironclaw_host_api::failure::summary::reborn_failure_summary_for_category at 64 — they are counted neither in the figure above nor in this dimension's score. 35 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: crates/contracts/ironclaw_host_api/src/failure/summary.rs (ironclaw_host_api::failure::summary::reborn_failure_summary_for_category at 64), crates/kernel/ironclaw_host_runtime/src/first_party_tools/schemas.rs (ironclaw_host_runtime::first_party_tools::schemas::resolve_builtin_input_schema_ref at 58), crates/extensions/packages/github/wasm-src/src/dispatch.rs (github_tool::dispatch::execute_inner at 47), crates/product/ironclaw_assistant/src/reborn_services/product_capability_handlers.rs (ProductCommandHandler::parse at 43), crates/contracts/ironclaw_host_api/src/result_meta.rs (FailureKind::from_primary_tag at 37), and 30 more not listed here. 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.
+ 241 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 10 ironclaw_llm finding(s) in Cyclomatic Complexity — start with agent_message.rs (2), anthropic_oauth.rs (2), reasoning.rs. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 8 ironclaw_assistant finding(s) in Cyclomatic Complexity — start with worker.rs (2), triggered.rs, display_preview.rs. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 7 ironclaw_documents finding(s) in Cyclomatic Complexity — start with docx.rs (3), xlsx.rs (2), html_pdf.rs (2). — One of this dimension's main actionable groups (7 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.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 334 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 18 ironclaw_llm finding(s) in Cognitive Complexity — start with agent_message.rs (3), reasoning.rs (2), rig_adapter.rs (2). — One of this dimension's main actionable groups (18 warning-level).
Resolve the 15 ironclaw_stress finding(s) in Cognitive Complexity — start with api_capacity.rs (6), main.rs (4), scripted.rs (3). — One of this dimension's main actionable groups (15 warning-level).
Resolve the 14 ironclaw_extension_support finding(s) in Cognitive Complexity — start with grep_tool.rs (3), file.rs (3), text.rs (2). — One of this dimension's main actionable groups (14 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.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.3 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 216 FileTooLong finding(s) in God Classes — start with lib.rs (9), mod.rs (7), runtime.rs (4). — One of this dimension's main actionable groups (216 warning-level).
Resolve the 144 FunctionTooLong finding(s) in God Classes — start with lib.rs (5), main.rs (4), rows.rs (3). — One of this dimension's main actionable groups (144 warning-level).
Resolve the 112 MethodTooLong finding(s) in God Classes — start with gemini_oauth.rs (5), REDACTED (3), lib.rs (3). — One of this dimension's main actionable groups (112 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.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
931 duplicated block group(s) detected. A further 50 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 16 of the 981 are in trees this repository does not ship — vendored, example/demo, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 186 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 75 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with mod.rs (3), filesystem_service.rs (3), in_memory.rs (3). — One of this dimension's main actionable groups (75 warning-level).
Resolve the 71 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with mod.rs (4), REDACTED (4), handlers.rs (3). — One of this dimension's main actionable groups (71 warning-level).
Resolve the 67 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with fakes.rs (4), mod.rs (4), REDACTED (3). — One of this dimension's main actionable groups (67 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling7.9 / 10Strong✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
76 production modules (Cargo+npm), 0 dependency cycle(s), 6 unstable depended-on module(s). Read from the build's own module declarations; 16 module(s) off the main sequence, with abstractness counted on 73 of the 76 (the rest declare no modelled class or interface, export only macros, or are not Gradle/Maven modules or Cargo crates).
Off the main sequence: ironclaw_common · ×16
Unstable project ironclaw_assistant
Unstable project ironclaw_extension_host
Unstable project ironclaw_extension_manager
Unstable project ironclaw_host_runtime
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 16 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (16 warning-level).
Resolve the 1 Unstable project ironclaw_assistant finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Unstable project ironclaw_extension_host finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
All 6 mechanizable ADR(s) are enforced: 6 by analyzers, 0 by tests. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).
✓ On the Gold path — maintain.
Detailed fixes: d7_recommendation.md.
Do you agree with this assessment?
D9 · Test Distribution9.3 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
20371 test methods: 13250 unit, 6033 integration, 0 BDD, 1088 e2e. The JavaScript/TypeScript suite contributes 1527 `it`/`test` case(s) across 179 test file(s) declaring at least one; its tier split is read from package names and paths only. The Rust suite contributes 17011 `#[test]` function(s) across 1410 file(s) declaring at least one; its unit/integration split is Cargo's own — 414 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test. The Python suite contributes 1833 test function(s) across 143 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 1518 tests. Measured on the JavaScript/TypeScript suite only — at least 910 test source file(s) (.rs, .py) went unread, so its test quality is unmeasured and is not in these counts.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
27 outdated, 0 yanked direct Cargo dependencies. 101 of 104 direct crates were graded against crates.io (0 not published there, 3 not resolved by a committed REDACTED). Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.
Outdated: aes-gcm · ×27
What to do
Improve Dependency Hygiene — currently 8.7/10. — 27 outdated, 0 yanked direct Cargo dependencies. 101 of 104 direct crates were graded against crates.io (0 not published there, 3 not resolved by a committed REDACTED). Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
7 secret(s) detected. 2 detection(s) binding a constant this repository later uses as the needle of a text substitution were excluded — a value spliced into the program's own output as a marker and stripped back out is high-entropy so that it cannot collide with that text, and there is no issuer at which it could be revoked.
REDACTED
What to do
Resolve the 7 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (3), REDACTED, REDACTED. — One of this dimension's main actionable groups (7 issue-level).
Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: crates/app/ironclaw_composition/src/runtime.rs (195×54=10530); crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChat.ts (37×170=6290); crates/product/ironclaw_assistant/src/reborn_services.rs (102×50=5100) Repeated repair below the complexity floor: crates/contracts/ironclaw_loop_contracts/src/host/context.rs (3 of 5 changes were fixes); crates/app/ironclaw_composition/src/filesystem_assembly.rs (3 of 4 changes were fixes); crates/extensions/packages/telegram/src/linked/login.rs (3 of 3 changes were fixes)
Resolve the 185 Hotspot finding(s) in Churn × Complexity Hotspots — start with error.rs (5), lib.rs (4), mod.rs (3). — One of this dimension's main actionable groups (185 warning-level).
Resolve the 3 Repeated repair finding(s) in Churn × Complexity Hotspots — start with context.rs, filesystem_assembly.rs, login.rs. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.4 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
105 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is tools/ironclaw_stress/src/scripted.rs. Counted over 1689 of the 2026 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1 · ×6
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
13 deducted task-comment markers across 994027 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.
Resolve the 13 TodoComment finding(s) in Explicit Debt — start with types.rs (2), api.ts (2), secret_store.rs (2). — One of this dimension's main actionable groups (13 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
IronClaw's root README and crates/README are exemplary: the former is a clear, globally branded overview with an English, Chinese, Russian, Japanese, Korean multilingual landing page plus a full Quick Start, Philosophy, Features, Security, Architecture, and license section; the latter is a ten-family human map of the Cargo workspace (contracts, kernel, substrates, lanes, loop, extensions, product, app) that mirrors its mental model with an exhaustive list of sections. The READMEs are complete for their directories but each document's scope is self-contained within its own directory — no repository-wide overview, installation, or contribution guidance appears in any of the shown files. The repository's READMEs and architecture/Docs files are clear and complete for their respective directories: the scripts/slack_smoke/, scripts/telegram_smoke/, and tools/ironclaw_stress/README.md each document a single test directory with setup, usage, smoke-cases, and an exhaustive run list; the ironclaw_architecture_tests README is a well-structured architecture-contract test suite that documents its own package and uses the contract-testing discipline. The root READMEs (for the repository as a whole) are not shown in this summary, so their presence or absence cannot be judged from these files alone. The project is a well-organized contracts hierarchy with each crate's README documenting itself as the assembly root for its layer and naming the zero-dep rule that protects it. The public surface lists load-bearing modules (e.g., channel_adapter ChannelIngress plus normalized inbound message DTOs) and the three documented exceptions, while the outline names every visible section present in the body.
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR QualityExemplary◐ Sampled · advisory
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
What it measures: Whether domain types (IDs, enums, value objects) leak across bounded-context boundaries.
Method: Cross-context domain-type leakage via Roslyn structural classification (strongly-typed IDs / value objects) over every public surface. Exhaustive, deterministic, type-level aggregate-boundary check.
Coverage: Bounded contexts derived from NAMESPACE prefix (or graph-inferred where available); cross-boundary domain-type leakage then checked exhaustively over every public member of every type.
16 of 78 build units (Cargo) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
10 finding(s): 0 critical, 10 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 10 REDACTED finding(s) in Secrets (history) — start with REDACTED (2), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (10 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
27 finding(s): 0 critical, 23 high, 3 medium, 1 low. 4 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 49 file(s) — `crates/app/ironclaw_composition/src/factory/production_backend_assembly.rs` (line 364, lines 365–366, lines 367–368, …), `crates/app/ironclaw_composition/src/runtime.rs` (line 3136, lines 3137–3138, lines 3139–3140, …), `crates/product/ironclaw_webui/frontend/src/components/command-palette.stories.tsx` (line 27), `crates/product/ironclaw_webui/frontend/src/components/notification-center.stories.tsx` (line 41), `crates/product/ironclaw_webui/frontend/src/components/page-header.stories.tsx` (line 43), … (+44 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 13 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 7 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 7 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (6), REDACTED. — One of this dimension's main actionable groups (7 issue-level).
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (4 issue-level).
No action in Static Analysis (SAST) — all 4 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (4 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle, npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 7 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (6), REDACTED. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 4 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (4 issue-level).
Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 4 High IaC finding(s) in IaC & Container Security — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 3 Medium IaC finding(s) in IaC & Container Security — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
29 of 1689 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is scripts/workflow_canary/telegram_mock.py. Counted over 1689 of the 2026 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Orphaned files with no living knowledge
✓ On the Gold path — maintain.
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 15 Change coupling finding(s) in Change Coupling — start with reborn_services.rs (2), runtime.rs (2), REDACTED (2). — One of this dimension's main actionable groups (15 warning-level).
Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with error.rs, lib.rs. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
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 — start with REDACTED. — 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).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 3 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives5.5 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation). — crates/product/ironclaw_webui/frontend/src/pages/chat/components/attachment-preview.tsx:207
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels6.3 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. (×5) — crates/product/ironclaw_webui/frontend/src/components/command-palette.tsx:90, crates/product/ironclaw_webui/frontend/src/pages/chat/components/chat-input.tsx:810, crates/product/ironclaw_webui/frontend/src/pages/jobs/components/job-activity-tab.tsx:129, …
This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×2) — crates/product/ironclaw_webui/frontend/src/pages/admin/components/user-detail.tsx:232, crates/product/ironclaw_webui/frontend/src/pages/admin/components/users-tab.tsx:133
This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. — crates/product/ironclaw_webui/frontend/src/pages/chat/components/markdown-renderer.tsx:329
This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×3) — crates/product/ironclaw_webui/frontend/src/pages/chat/components/thread-sidebar.tsx:40, crates/product/ironclaw_webui/frontend/src/pages/jobs/components/job-activity-tab.tsx:97, crates/product/ironclaw_webui/frontend/src/pages/jobs/components/jobs-list.tsx:72
This UI-library field component has no label / aria-label / aria-labelledby / id / name — and neither does anything it renders — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. — crates/product/ironclaw_webui/frontend/src/pages/settings/components/skill-card.tsx:83
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Do you agree with this assessment?
AC3 · Page structure7.4 / 10Strong✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. — crates/product/ironclaw_webui/frontend/public/wallet-connect.html:2
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: interactive elements plus elements the markup gives a click/key handler or the repo's own CSS styles `cursor: pointer`, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×3) — crates/product/ironclaw_webui/frontend/src/pages/chat/components/markdown-renderer.tsx:318, crates/product/ironclaw_webui/frontend/src/pages/chat/components/markdown-renderer.tsx:329, crates/product/ironclaw_webui/frontend/src/pages/logs/logs-page.tsx:43
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
`[class~="bg-signal"],[class~="bg-signal/60"]` sets color: #ffffff !important on background-color: #4ca7e6 !important — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — crates/product/ironclaw_webui/frontend/src/styles/app.css:273
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Do you agree with this assessment?
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.
No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 161 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
What to do
Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
`ironclaw_web_app` is a Application project but references `ironclaw_host_api`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Other · Domain Modelling — Whether an aggregate references another aggregate by identity rather than embedding it by object reference.
Method: Roslyn (DDD-gated): aggregate roots identified by convention; each aggregate field checked for direct references to other aggregates versus id-only. Deterministic, DDD-native.
Coverage: Population: aggregate roots identified by AggregateRoot/IAggregateRoot base/interface NAME convention; reference-by-identity then checked exhaustively within that set — a root not using those names is invisible.
Other · Domain Modelling — Whether domain identifiers are strongly typed (a newtype wrapper) rather than raw primitives — consistency once an idiom exists.
Method: Roslyn (DDD-gated): strongly-typed id adoption on domain entities/events; raw Guid/int/string ids counted versus wrapped types. An id wrapper is recognised by VALUE SEMANTICS, not by being a struct — a record struct, a record class (`record ApartmentId(Guid Value)`) or a class declared by a typed-id base (`class MemberId : TypedIdValueBase`) all count, while a plain mutable class (reference equality) and a verb-phrase query record (`GetCustomerById`) do not. Deterministic, adoption percentage.
Coverage: Population: id-like members by *Id/*Key NAME suffix; strongly-typed-ID shape then checked semantically — non-suffixed identifiers are not seen.
Do you agree with this assessment?
DM4 · Rich vs anemic domain model8.0 / 10Strong✓ Tool-verified
Other · Domain Modelling — Whether domain entities own their behaviour (invariant-enforcing commands) rather than being data-only structs driven by a foreign service.
Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.
Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.
`DeviceCodeStart` is a data-only domain entity with `pub` mutable state and no invariant-enforcing behaviour of its own, while the repo holds the logic in a foreign service/manager/use-case — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants (or make it an immutable value object with private fields) rather than being driven from outside. — crates/domains/ironclaw_llm/src/openai_codex_session.rs:150
`SessionSkillActivationPorts` is a data-only domain entity with `pub` mutable state and no invariant-enforcing behaviour of its own, while the repo holds the logic in a foreign service/manager/use-case — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants (or make it an immutable value object with private fields) rather than being driven from outside. — crates/product/ironclaw_assistant/src/inbound_turn.rs:198
What to do
Move the domain logic onto the entity (invariant-enforcing `&mut self` commands) instead of a foreign service.
Other · Domain Modelling — Whether a domain type's identity-bearing field stays immutable — a `pub` mutable field under a hand-rolled Hash/PartialEq breaks the value-identity invariant.
Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.
Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.
Other · Domain Modelling — Whether repositories are per aggregate root (not per child entity) and keep the persistence query handle behind the contract, so the root's invariants can't be bypassed.
Method: Roslyn (DDD-gated): repository abstraction detection; repositories over non-aggregate-root entities flagged, and (C#/VB) repository INTERFACES whose members return a live persistence query handle (IQueryable/DbSet/IMongoQueryable) — implementations and specification evaluators are out of population by design, since composing a query internally is what an implementation is for. Deterministic, DDD-native.
Coverage: Population: repositories + aggregate roots by NAME convention; per-root repository rule checked within the set.
Other · Event-Driven — Whether state changes and message publishes are atomic (a transactional outbox) rather than a crash-unsafe dual write.
Method: Roslyn semantic scan (event-driven gated): event-handler methods scanned for DB-save plus bus-publish without a transactional outbox reference. Deterministic, semantic-resolved.
`NotificationChannelsSetHandler.request_approval` performs two independent DURABLE writes — a durable state write (`replay_payload_store.save`, :263) and a second independent durable store write — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — crates/app/ironclaw_composition/src/runtime/capability_host/notification_channels_set.rs:245
What to do
Adopt the transactional outbox pattern so DB writes and message publishes commit atomically — no lost or phantom events on a crash.
Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.
Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.
Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.
Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a README to the 10 of 81 project(s) that lack one — worth up to 0.2 pts.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
Only 54/56 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/product/ironclaw_host_ingress`, `harness/latency/runner`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Add OpenTelemetry tracing/metrics (opentelemetry with tracing-opentelemetry) so requests are traceable across the system, not just health-probable.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Dependabot is configured but does not watch `npm`, `pip` — add those `package-ecosystem` entries to REDACTED 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.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Do you agree with this assessment?
P5 · DR & Backup0.0 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.
What to do
Codify backups + geo-recovery in IaC and document RTO/RPO and the restore procedure — a persistence guard alone is not disaster recovery.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. 2 of the 39 files that make outbound calls are unbounded; the first 2 are listed. — crates/app/ironclaw_cli/src/commands/traces/mod.rs:1261
`Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — crates/domains/ironclaw_llm/src/session.rs:131
What to do
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.
Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin) or inside a Java method returning a Reactor Mono/Flux — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Do you agree with this assessment?
R1 · Type Safety10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.
31 duplicated blocks under crates/product/ironclaw_webui/frontend/src/pages/ have copies in at least two of the sibling directories admin, automations, chat, extensions, jobs, logs (+4 more sibling(s) not listed) — 16 of them are reported below, and 15 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 31 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 31 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 31 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. — crates/product/ironclaw_webui/frontend/src/pages/admin/components/users-tab.tsx:88
20 duplicated blocks under crates/product/ironclaw_webui/frontend/src/ have copies in at least two of the sibling directories app, components, design-system, hooks, lib, pages — 10 of them are reported below, and 10 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 20 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 20 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 20 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. — crates/product/ironclaw_webui/frontend/src/design-system/select-menu.tsx:348
crates/product/ironclaw_webui/frontend/src/pages/admin/components/users-tab.tsx:88 · crates/product/ironclaw_webui/frontend/src/pages/settings/components/users-tab.tsx:32 — the two spans are one implementation copied and then locally edited — 490 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. — crates/product/ironclaw_webui/frontend/src/pages/admin/components/users-tab.tsx:88
crates/product/ironclaw_webui/frontend/src/pages/extensions/components/channels-tab.tsx:34 · crates/product/ironclaw_webui/frontend/src/pages/extensions/components/tools-tab.tsx:45 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — crates/product/ironclaw_webui/frontend/src/pages/extensions/components/channels-tab.tsx:34
crates/product/ironclaw_webui/frontend/src/pages/jobs/jobs-page.tsx:79 · crates/product/ironclaw_webui/frontend/src/pages/projects/projects-page.tsx:90 — the two spans are one implementation copied and then locally edited — 303 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. — crates/product/ironclaw_webui/frontend/src/pages/jobs/jobs-page.tsx:79
crates/product/ironclaw_webui/frontend/src/pages/projects/components/projects-grid.tsx:11 · crates/product/ironclaw_webui/frontend/src/pages/projects/components/projects-grid.tsx:81 — the two spans are one implementation copied and then locally edited — 275 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. — crates/product/ironclaw_webui/frontend/src/pages/projects/components/projects-grid.tsx:11
crates/product/ironclaw_webui/frontend/src/lib/pin-store.ts:45 · crates/product/ironclaw_webui/frontend/src/lib/thread-state.ts:94 — the two spans are one implementation copied and then locally edited — 102 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. — crates/product/ironclaw_webui/frontend/src/lib/pin-store.ts:45
crates/product/ironclaw_webui/frontend/src/design-system/select-menu.tsx:348 · crates/product/ironclaw_webui/frontend/src/pages/workspace/components/workspace-tree.tsx:380 — the two spans are one implementation copied and then locally edited — 103 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. — crates/product/ironclaw_webui/frontend/src/design-system/select-menu.tsx:348
crates/product/ironclaw_webui/frontend/src/pages/settings/components/agent-tab.tsx:18 · crates/product/ironclaw_webui/frontend/src/pages/settings/components/networking-tab.tsx:37 — 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. — crates/product/ironclaw_webui/frontend/src/pages/settings/components/agent-tab.tsx:18
crates/product/ironclaw_webui/frontend/src/lib/api.ts:696 · crates/product/ironclaw_webui/frontend/src/lib/api.ts:727 — 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. — crates/product/ironclaw_webui/frontend/src/lib/api.ts:696
crates/product/ironclaw_webui/frontend/src/design-system/card.tsx:111 · crates/product/ironclaw_webui/frontend/src/design-system/card.tsx:147 — all 2 copies are in the same file, 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. — crates/product/ironclaw_webui/frontend/src/design-system/card.tsx:111
crates/product/ironclaw_webui/frontend/src/lib/device-link-api.ts:263 · crates/product/ironclaw_webui/frontend/src/lib/device-link-api.ts:329 — 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. — crates/product/ironclaw_webui/frontend/src/lib/device-link-api.ts:263
crates/product/ironclaw_webui/frontend/src/pages/chat/components/message-bubble.tsx:199 · crates/product/ironclaw_webui/frontend/src/pages/chat/components/message-bubble.tsx:222 — 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. — crates/product/ironclaw_webui/frontend/src/pages/chat/components/message-bubble.tsx:199
crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx:274 · crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx:299 — 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. — crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx:274
crates/product/ironclaw_webui/frontend/src/pages/extensions/components/extension-card.tsx:301 · crates/product/ironclaw_webui/frontend/src/pages/extensions/components/extension-card.tsx:383 — 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. — crates/product/ironclaw_webui/frontend/src/pages/extensions/components/extension-card.tsx:301
crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts:442 · crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts:750 — 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. — crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts:442
crates/product/ironclaw_webui/frontend/src/pages/workspace/components/workspace-tree.tsx:158 · crates/product/ironclaw_webui/frontend/src/pages/workspace/components/workspace-tree.tsx:492 — all 2 copies are in the same file, 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. — crates/product/ironclaw_webui/frontend/src/pages/workspace/components/workspace-tree.tsx:158
crates/product/ironclaw_webui/frontend/src/lib/device-push.ts:200 · crates/product/ironclaw_webui/frontend/src/lib/device-push.ts:263 — the two spans are one implementation copied and then locally edited — 100 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. — crates/product/ironclaw_webui/frontend/src/lib/device-push.ts:200
crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx:225 · crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx:243 — 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. — crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx:225
crates/product/ironclaw_webui/frontend/src/components/notification-center.tsx:18 · crates/product/ironclaw_webui/frontend/src/components/notification-panel.tsx:138 — 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. — crates/product/ironclaw_webui/frontend/src/components/notification-center.tsx:18
crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useSSE.ts:65 · crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/useInspector.ts:77 — 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. — crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useSSE.ts:65
crates/product/ironclaw_webui/frontend/src/pages/settings/components/inference-tab.tsx:175 · crates/product/ironclaw_webui/frontend/src/pages/settings/components/networking-tab.tsx:25 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — crates/product/ironclaw_webui/frontend/src/pages/settings/components/inference-tab.tsx:175
crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChannelOnboarding.ts:299 · crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChannelOnboarding.ts:316 — the two spans are one implementation copied and then locally edited — 69 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. — crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChannelOnboarding.ts:299
crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useConnectLinkLanding.ts:33 · crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useSetupLanding.ts:42 — the two spans are one implementation copied and then locally edited — 98 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. — crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useConnectLinkLanding.ts:33
crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:720 · crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:970 — 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. — crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:720
crates/product/ironclaw_webui/frontend/src/pages/extensions/components/channels-tab.tsx:53 · crates/product/ironclaw_webui/frontend/src/pages/extensions/components/tools-tab.tsx:64 · crates/product/ironclaw_webui/frontend/src/pages/settings/components/trace-commons-tab.tsx:228 — the 3 copies are spread across 3 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. — crates/product/ironclaw_webui/frontend/src/pages/extensions/components/channels-tab.tsx:53
crates/product/ironclaw_webui/frontend/src/pages/settings/hooks/useProviderDialogForm.ts:81 · crates/product/ironclaw_webui/frontend/src/pages/settings/hooks/useProviderDialogForm.ts:97 — the two spans are one implementation copied and then locally edited — 99 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. — crates/product/ironclaw_webui/frontend/src/pages/settings/hooks/useProviderDialogForm.ts:81
crates/product/ironclaw_webui/frontend/src/pages/settings/lib/trace-api.ts:52 · crates/product/ironclaw_webui/frontend/src/pages/settings/lib/trace-api.ts:100 — 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. — crates/product/ironclaw_webui/frontend/src/pages/settings/lib/trace-api.ts:52
crates/product/ironclaw_webui/frontend/src/app/app.tsx:126 · crates/product/ironclaw_webui/frontend/src/app/app.tsx:154 — 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. — crates/product/ironclaw_webui/frontend/src/app/app.tsx:126
crates/product/ironclaw_webui/frontend/src/lib/api.ts:950 · crates/product/ironclaw_webui/frontend/src/pages/chat/lib/attachments.ts:107 — 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. — crates/product/ironclaw_webui/frontend/src/lib/api.ts:950
crates/product/ironclaw_webui/frontend/src/pages/workspace/lib/workspace-api.ts:264 · crates/product/ironclaw_webui/frontend/src/pages/workspace/lib/workspace-api.ts:278 — 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. — crates/product/ironclaw_webui/frontend/src/pages/workspace/lib/workspace-api.ts:264
crates/product/ironclaw_webui/frontend/src/lib/notification-setup-api.ts:49 · crates/product/ironclaw_webui/frontend/src/lib/notification-setup-api.ts:62 — 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. — crates/product/ironclaw_webui/frontend/src/lib/notification-setup-api.ts:49
crates/product/ironclaw_webui/frontend/src/lib/vm-component-harness.ts:29 · crates/product/ironclaw_webui/frontend/src/lib/vm-inline-source.ts:18 — 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. — crates/product/ironclaw_webui/frontend/src/lib/vm-component-harness.ts:29
crates/product/ironclaw_webui/frontend/src/pages/chat/chat.tsx:491 · crates/product/ironclaw_webui/frontend/src/pages/chat/chat.tsx:624 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — crates/product/ironclaw_webui/frontend/src/pages/chat/chat.tsx:491
crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:827 · crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:847 — 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. — crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:827
crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts:296 · crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts:356 — 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. — crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts:296
crates/product/ironclaw_webui/frontend/src/components/link-payload-panel.tsx:131 · crates/product/ironclaw_webui/frontend/src/pages/automations/components/automations-empty-state.tsx:24 — the two spans are one implementation copied and then locally edited — 72 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. — crates/product/ironclaw_webui/frontend/src/components/link-payload-panel.tsx:131
crates/product/ironclaw_webui/frontend/src/lib/thread-meta.ts:46 · crates/product/ironclaw_webui/frontend/src/pages/workspace/lib/workspace-presenters.ts: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. — crates/product/ironclaw_webui/frontend/src/lib/thread-meta.ts:46
crates/product/ironclaw_webui/frontend/src/pages/chat/components/auth-generic-card.tsx:23 · crates/product/ironclaw_webui/frontend/src/pages/chat/components/auth-token-card.tsx:75 — the two spans are one implementation copied and then locally edited — 57 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. — crates/product/ironclaw_webui/frontend/src/pages/chat/components/auth-generic-card.tsx:23
crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useSSE.ts:270 · crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useSSE.ts:393 — the two spans are one implementation copied and then locally edited — 58 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. — crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useSSE.ts:270
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.
React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).
Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:1 imports highlight.js/lib/core, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:1
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:2 imports highlight.js/lib/languages/bash, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:2
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:3 imports highlight.js/lib/languages/c, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:3
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:4 imports highlight.js/lib/languages/cpp, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:4
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:5 imports highlight.js/lib/languages/csharp, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:5
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:6 imports highlight.js/lib/languages/css, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:6
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:7 imports highlight.js/lib/languages/diff, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:7
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:8 imports highlight.js/lib/languages/go, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:8
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:9 imports highlight.js/lib/languages/java, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:9
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:10 imports highlight.js/lib/languages/javascript, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:10
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:11 imports highlight.js/lib/languages/json, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:11
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:12 imports highlight.js/lib/languages/kotlin, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:12
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:13 imports highlight.js/lib/languages/markdown, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:13
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:14 imports highlight.js/lib/languages/python, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:14
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:15 imports highlight.js/lib/languages/ruby, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:15
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:16 imports highlight.js/lib/languages/rust, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:16
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:17 imports highlight.js/lib/languages/sql, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:17
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:18 imports highlight.js/lib/languages/typescript, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:18
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:19 imports highlight.js/lib/languages/xml, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:19
crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:20 imports highlight.js/lib/languages/yaml, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:20
What to do
Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
MessageBubbleImpl has cyclomatic complexity 82 and cognitive complexity 69; 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. — crates/product/ironclaw_webui/frontend/src/pages/chat/components/message-bubble.tsx:124
applyProjectionItems has cyclomatic complexity 74 and cognitive complexity 141; 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. — crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:523
ProviderCard has cyclomatic complexity 51 and cognitive complexity 43; 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. — crates/product/ironclaw_webui/frontend/src/pages/settings/components/provider-card.tsx:17
(anonymous) has cyclomatic complexity 49 and cognitive complexity 63; 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. — crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChat.ts:539
Chat has cyclomatic complexity 49 and cognitive complexity 40; 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. — crates/product/ironclaw_webui/frontend/src/pages/chat/chat.tsx:106
(anonymous) has cyclomatic complexity 48 and cognitive complexity 40; 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. — crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:88
ConfigureModal has cyclomatic complexity 45 and cognitive complexity 38; 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. — crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx:44
ExtensionCard has cyclomatic complexity 38 and cognitive complexity 34; 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. — crates/product/ironclaw_webui/frontend/src/pages/extensions/components/extension-card.tsx:148
scheduleLabel has cyclomatic complexity 37 and cognitive complexity 33; 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. — crates/product/ironclaw_webui/frontend/src/pages/automations/lib/automations-presenters.ts:129
ChatInput has cyclomatic complexity 35 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 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. — crates/product/ironclaw_webui/frontend/src/pages/chat/components/chat-input.tsx:30
mergeToolActivity has cyclomatic complexity 34 and cognitive complexity 26; 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. — crates/product/ironclaw_webui/frontend/src/pages/chat/lib/tool-activity-state.ts:136
LogsPage has cyclomatic complexity 31 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 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. — crates/product/ironclaw_webui/frontend/src/pages/logs/logs-page.tsx:121
publishProductInspectorEnvelope has cyclomatic complexity 27 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. — crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/product-activity-envelope.ts:123
(anonymous) has cyclomatic complexity 26 and cognitive complexity 26; 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. — crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChannelOnboarding.ts:511
toolCardFromPreview has cyclomatic complexity 26 and cognitive complexity 18; 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. — crates/product/ironclaw_webui/frontend/src/pages/chat/lib/history-messages.ts:201
Button has cyclomatic complexity 25 and cognitive complexity 26; 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. — crates/product/ironclaw_webui/frontend/src/design-system/button.tsx:110
isDeviceLinkPromptWire has cyclomatic complexity 25 and cognitive complexity 22; 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. — crates/product/ironclaw_webui/frontend/src/lib/device-link-api.ts:81
SkillCard has cyclomatic complexity 25 and cognitive complexity 20; 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. — crates/product/ironclaw_webui/frontend/src/pages/settings/components/skill-card.tsx:8
UserDetailView has cyclomatic complexity 24 and cognitive complexity 20; 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. — crates/product/ironclaw_webui/frontend/src/pages/admin/components/user-detail.tsx:47
insertPreservedAtOriginalPositions has cyclomatic complexity 23 and cognitive complexity 32; 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. — crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useHistory.ts:736
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files6.2 / 10Adequate✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
32 file(s) over 400 lines (counted as significant lines — blank lines excluded — over production source only, tests excluded), largest first: crates/product/ironclaw_webui/frontend/src/i18n/es.ts (1642), crates/product/ironclaw_webui/frontend/src/i18n/ar.ts (1641), crates/product/ironclaw_webui/frontend/src/i18n/de.ts (1641), crates/product/ironclaw_webui/frontend/src/i18n/fr.ts (1641), crates/product/ironclaw_webui/frontend/src/i18n/hi.ts (1641), crates/product/ironclaw_webui/frontend/src/i18n/ja.ts (1641) (+26 more).
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage9.3 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
crates/product/ironclaw_webui/frontend/src/app/retired-routines.test.ts:9 imports '../', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — crates/product/ironclaw_webui/frontend/src/app/retired-routines.test.ts
crates/product/ironclaw_webui/frontend/src/styles/theme-colors.test.ts:7 imports '../', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — crates/product/ironclaw_webui/frontend/src/styles/theme-colors.test.ts
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. (×14) — crates/product/ironclaw_webui/frontend/src/pages/settings/components/channels-tab.tsx, crates/product/ironclaw_webui/frontend/src/pages/settings/components/users-tab.tsx, crates/product/ironclaw_webui/frontend/src/design-system/props.type-test.tsx, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
What to do
Bump outdated dependencies to current versions to limit upgrade debt.
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
This repository declares test tooling, and the ✓ above records that declaration — but crates/product/ironclaw_webui/frontend/src/app/retired-routines.test.ts and 1 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to. — crates/product/ironclaw_webui/frontend/src/app/retired-routines.test.ts
Do you agree with this assessment?
R7 · Dead Code9.0 / 10Strong✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
Unreachable from the 15 application, 6 tooling and 318 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (15 application, 6 tooling, 318 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 (×11) — crates/product/ironclaw_webui/frontend/src/pages/settings/components/channels-tab.tsx, crates/product/ironclaw_webui/frontend/src/pages/settings/components/users-tab.tsx, crates/product/ironclaw_webui/frontend/src/design-system/props.type-test.tsx, …
no import path from any entry point (15 application, 6 tooling, 318 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (crates/product/ironclaw_webui/frontend/src/pages/projects/components/project-inspector-rail.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — crates/product/ironclaw_webui/frontend/src/pages/projects/components/project-thread-inspector.tsx
no import path from any entry point (15 application, 6 tooling, 318 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (crates/product/ironclaw_webui/frontend/src/pages/settings/components/users-tab.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — crates/product/ironclaw_webui/frontend/src/pages/settings/hooks/useUsers.ts
Nothing imports this binding — it is safe to review for removal. (×11) — crates/product/ironclaw_webui/frontend/src/app/routes.ts:31, crates/product/ironclaw_webui/frontend/src/app/routes.ts:81, crates/product/ironclaw_webui/frontend/src/design-system/primitives.tsx:33, …
Nothing imports THIS copy of 'StatusPill' — but crates/product/ironclaw_webui/frontend/src/design-system/primitives.tsx:19 in the same directory exports that same name, and it is the copy every import site resolves to. Grepping the name therefore finds live callers that do not reach this binding: it is the dead half of a duplicated pair, left behind when the API moved. Delete it here and keep crates/product/ironclaw_webui/frontend/src/design-system/primitives.tsx's, or, if this one is meant to be the survivor, repoint the importers before removing the other. — crates/product/ironclaw_webui/frontend/src/design-system/badge.tsx:96
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
crates/product/ironclaw_webui/frontend/src/i18n/ar.ts → crates/product/ironclaw_webui/frontend/src/lib/i18n.tsx → crates/product/ironclaw_webui/frontend/src/i18n/ar.ts (one verified cycle inside a mutually-dependent group of 11 files) — crates/product/ironclaw_webui/frontend/src/i18n/ar.ts
What to do
Break each cycle by extracting the shared piece into a module both sides can import.
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 1 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X9 Subsumed condition operand — 11 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
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.
Not included — 65 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AX1 Captive dependencies — 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
AX2 Stateful singletons — 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
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
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — compose up failed (exit 18 — an image could not be pulled) — postgres Pulling postgres Error Get "https://registry-1.docker.io/v2/": Forbidden Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the earlier `compose pull` step reported: postgres Pulling postgres Error Get "https://registry-1.docker.io/v2/": Forbidden Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the runtime sandbox reaches registries only through the in-fence pull-through mirror, so an image the mirror does not carry cannot be fetched — this is a limit of our sandbox, not of your stack; runtime evidence skipped 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 — Not assessed: these personal data 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 personal data 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.
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 — Test reliability not measured — JavaScript/TypeScript suite did not run
D14 License Compliance — Not scored — this repository's 837 shipped crate(s) were read from its REDACTED, but crates.io could not be asked for the licence of 9 of them (HTTP 429 Unknown Error), and a licence verdict over part of a dependency graph is not a licence verdict. Nothing is asserted about this repository's licensing in either direction.
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.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D24 Comment Value — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — none of 6 ADRs are conformance-checkable — unverifiable.
D27 Navigability — symbol resolution incomplete — too few calls resolved to assess navigability
D32 Data Compliance (PII/GDPR) — 32 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
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.
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.
D6 Cohesion (LCOM4) — D6 reads a CS/VB/GO/SCALA/SWIFT/DART/JAVA/PY/KT/TS/TSX/MTS/CTS/JS/JSX/MJS/CJS/PHP class graph only — this repository's production source is .c, .rs, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — crates/product/ironclaw_webui/frontend/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. 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.
DM3 Integration-event coupling — no integration events detected — coupling check not applicable
DM6 Domain ↔ infrastructure boundary — this Rust crate maps no type to a persistence framework (diesel/sea-orm/sqlx), so DM6's domain↔infrastructure fusion read has no population to be taken over
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
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.
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
P10 Library API & versioning — 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 — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) 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 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
PF2 Allocation hygiene — 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
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
X10 Duplicated predicate — 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.
X24 Document value interpolated into markup unescaped — 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.
X25 Inert configuration knob — 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 — 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.
X27 Collection changed while being enumerated — 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.
X28 Index access outside its own emptiness 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.
X29 Per-element action decided by a fixed element — 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.
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 — 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.
X32 Type resolved by simple name across every loaded assembly — 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.
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
X6 Hand-rolled structured-format parsing — 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 — 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
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
AC2 · Forms & labels· <input> without a programmatic label · ×4
<input> without a programmatic label crates/product/ironclaw_webui/frontend/src/components/command-palette.tsx:90— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label crates/product/ironclaw_webui/frontend/src/pages/jobs/components/job-activity-tab.tsx:129— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label crates/product/ironclaw_webui/frontend/src/pages/jobs/components/jobs-list.tsx:66— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label crates/product/ironclaw_webui/frontend/src/pages/projects/components/projects-grid.tsx:175— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
AC2 · Forms & labels· <select> without a programmatic label · ×3
<select> without a programmatic label crates/product/ironclaw_webui/frontend/src/pages/chat/components/thread-sidebar.tsx:40— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label crates/product/ironclaw_webui/frontend/src/pages/jobs/components/job-activity-tab.tsx:97— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label crates/product/ironclaw_webui/frontend/src/pages/jobs/components/jobs-list.tsx:72— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×3
Click handler on a non-interactive <div> crates/product/ironclaw_webui/frontend/src/pages/chat/components/markdown-renderer.tsx:318— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> crates/product/ironclaw_webui/frontend/src/pages/chat/components/markdown-renderer.tsx:329— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> crates/product/ironclaw_webui/frontend/src/pages/logs/logs-page.tsx:43— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC2 · Forms & labels· <label> that labels no control · ×2
<label> that labels no control crates/product/ironclaw_webui/frontend/src/pages/admin/components/user-detail.tsx:232— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control crates/product/ironclaw_webui/frontend/src/pages/admin/components/users-tab.tsx:133— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
DM4 · Rich vs anemic domain model· Anemic domain model · ×2
Anemic domain model: DeviceCodeStart crates/domains/ironclaw_llm/src/openai_codex_session.rs:150— `DeviceCodeStart` is a data-only domain entity with `pub` mutable state and no invariant-enforcing behaviour of its own, while the repo holds the logic in a foreign service/manager/use-case — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants (or make it an immutable value object with private fields) rather than being driven from outside.
Anemic domain model: SessionSkillActivationPorts crates/product/ironclaw_assistant/src/inbound_turn.rs:198— `SessionSkillActivationPorts` is a data-only domain entity with `pub` mutable state and no invariant-enforcing behaviour of its own, while the repo holds the logic in a foreign service/manager/use-case — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants (or make it an immutable value object with private fields) rather than being driven from outside.
AC2 · Forms & labels· <textarea> without a programmatic label · ×1
<textarea> without a programmatic label crates/product/ironclaw_webui/frontend/src/pages/chat/components/chat-input.tsx:810— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
AC2 · Forms & labels· Custom control with no accessible name on <div> · ×1
Custom control with no accessible name on <div> crates/product/ironclaw_webui/frontend/src/pages/chat/components/markdown-renderer.tsx:329— This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Dependency-rule violation: ironclaw_web_app (Application) → ironclaw_host_api (Web) — `ironclaw_web_app` is a Application project but references `ironclaw_host_api`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
Dual write (no outbox): NotificationChannelsSetHandler.request_approval crates/app/ironclaw_composition/src/runtime/capability_host/notification_channels_set.rs:245— `NotificationChannelsSetHandler.request_approval` performs two independent DURABLE writes — a durable state write (`replay_payload_store.save`, :263) and a second independent durable store write — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox).
FileTooLong: reborn_webui_v2_live_qa/run_live_qa.py scripts/reborn_webui_v2_live_qa/run_live_qa.py— FileTooLong — 6856 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 6356 over it, 13.71× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/reborn_services.rs crates/product/ironclaw_assistant/src/reborn_services.rs— FileTooLong — 5647 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 125 free functions. The bar is 500 significant lines; this is 5147 over it, 11.29× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/runtime.rs crates/app/ironclaw_composition/src/runtime.rs— FileTooLong — 3520 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 3020 over it, 7.04× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/filesystem_service.rs crates/domains/ironclaw_threads/src/filesystem_service.rs— FileTooLong — 3358 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 81% of them inside a single declaration: FilesystemSessionThreadService (4 blocks, 229-3987), declaring 54 free functions. The bar is 500 significant lines; this is 2858 over it, 6.72× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: webui_v2/handlers.rs crates/product/ironclaw_webui/src/webui_v2/handlers.rs— FileTooLong — 3332 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 188 free functions. The bar is 500 significant lines; this is 2832 over it, 6.66× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/installations.rs crates/extensions/ironclaw_extension_registry/src/installations.rs— FileTooLong — 3263 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 61% of them inside a single declaration: ExtensionInstallationStore (4 blocks, 1291-4015), declaring 35 free functions. The bar is 500 significant lines; this is 2763 over it, 6.53× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/capability_port.rs crates/loop/ironclaw_loop_host/src/capability_port.rs— FileTooLong — 2762 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 59 free functions. The bar is 500 significant lines; this is 2262 over it, 5.52× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/lib.rs crates/loop/ironclaw_loop_host/src/lib.rs— FileTooLong — 2502 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 46 free functions. The bar is 500 significant lines; this is 2002 over it, 5.00× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 2381 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 32 free functions. The bar is 500 significant lines; this is 1881 over it, 4.76× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/api_capacity.rs tools/ironclaw_stress/src/api_capacity.rs— FileTooLong — 2319 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 63 free functions. The bar is 500 significant lines; this is 1819 over it, 4.64× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/product_lifecycle.rs crates/extensions/ironclaw_extension_host/src/product_lifecycle.rs— FileTooLong — 2177 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 76% of them inside a single declaration: ExtensionLifecycleManager (3 blocks, 137-2862). The bar is 500 significant lines; this is 1677 over it, 4.35× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/model_gateway.rs crates/loop/ironclaw_loop_host/src/model_gateway.rs— FileTooLong — 2177 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 53 free functions. The bar is 500 significant lines; this is 1677 over it, 4.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 1947 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 36 free functions. The bar is 500 significant lines; this is 1447 over it, 3.89× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/main.rs tools/ironclaw_stress/src/main.rs— FileTooLong — 1913 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 37 free functions. The bar is 500 significant lines; this is 1413 over it, 3.83× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/user_turn.rs tools/ironclaw_stress/src/user_turn.rs— FileTooLong — 1907 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 45 free functions. The bar is 500 significant lines; this is 1407 over it, 3.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/lib.rs crates/kernel/ironclaw_resources/src/lib.rs— FileTooLong — 1853 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 45 free functions. The bar is 500 significant lines; this is 1353 over it, 3.71× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED crates/domains/ironclaw_triggers/src/libsql.rs— FileTooLong — 1759 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 65% of them inside a single declaration: LibSqlTriggerRepository (3 blocks, 78-1572). The bar is 500 significant lines; this is 1259 over it, 3.52× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: webui_v2/descriptors.rs crates/product/ironclaw_webui/src/webui_v2/descriptors.rs— FileTooLong — 1675 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 132 free functions. The bar is 500 significant lines; this is 1175 over it, 3.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/loop_driver_host.rs crates/loop/ironclaw_turn_runner/src/loop_driver_host.rs— FileTooLong — 1633 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1133 over it, 3.27× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/memory.rs crates/domains/ironclaw_conversations/src/memory.rs— FileTooLong — 1604 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 66% of them inside a single declaration: InMemoryConversationServices (8 blocks, 35-1391). The bar is 500 significant lines; this is 1104 over it, 3.21× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/outbound_state_store.rs crates/domains/ironclaw_outbound/src/outbound_state_store.rs— FileTooLong — 1583 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 75% of them inside a single declaration: OutboundStateStore (7 blocks, 223-2314), declaring 39 free functions. The bar is 500 significant lines; this is 1083 over it, 3.17× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/in_memory.rs crates/domains/ironclaw_threads/src/in_memory.rs— FileTooLong — 1548 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 80% of them inside a single declaration: InMemorySessionThreadService (3 blocks, 43-1768). The bar is 500 significant lines; this is 1048 over it, 3.10× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: skill_activation/activation.rs crates/loop/ironclaw_loop_host/src/skill_activation/activation.rs— FileTooLong — 1522 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 37 free functions. The bar is 500 significant lines; this is 1022 over it, 3.04× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: dispatch/mod.rs crates/loop/ironclaw_hooks/src/dispatch/mod.rs— FileTooLong — 1518 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 76% of them inside a single declaration: HookDispatcher (2 blocks, 234-2141). The bar is 500 significant lines; this is 1018 over it, 3.04× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED crates/domains/ironclaw_triggers/src/postgres.rs— FileTooLong — 1491 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 67% of them inside a single declaration: PostgresTriggerRepository (3 blocks, 48-1246). The bar is 500 significant lines; this is 991 over it, 2.98× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
Hotspot: crates/app/ironclaw_composition/src/runtime.rs crates/app/ironclaw_composition/src/runtime.rs:3111— crates/app/ironclaw_composition/src/runtime.rs changed 195 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in ironclaw_composition::runtime::build_runtime_with_resource_governor at line 3111. 9 of those changes were fix/bug commits, and the other 186 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/app/ironclaw_composition/src/runtime.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChat.ts crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChat.ts:153— crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChat.ts changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 170 in useChat.useChat at line 153. 1 of those changes was a fix/bug commit, and the other 36 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChat.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/product/ironclaw_assistant/src/reborn_services.rs crates/product/ironclaw_assistant/src/reborn_services.rs:4465— crates/product/ironclaw_assistant/src/reborn_services.rs changed 102 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in RebornServices::query at line 4465. 2 of those changes were fix/bug commits, and the other 100 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/product/ironclaw_assistant/src/reborn_services.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: scripts/ci/reborn_pr_test_plan.py scripts/ci/reborn_pr_test_plan.py:963— scripts/ci/reborn_pr_test_plan.py changed 47 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 95 in reborn_pr_test_plan.build_plan at line 963. 13 of those changes were fix/bug commits, and the other 34 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- scripts/ci/reborn_pr_test_plan.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/product/ironclaw_webui/frontend/src/pages/chat/chat.tsx crates/product/ironclaw_webui/frontend/src/pages/chat/chat.tsx:106— crates/product/ironclaw_webui/frontend/src/pages/chat/chat.tsx changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 82 in chat.Chat at line 106. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/product/ironclaw_webui/frontend/src/pages/chat/chat.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/loop/ironclaw_agent_loop/src/executor/capabilities.rs crates/loop/ironclaw_agent_loop/src/executor/capabilities.rs:64— crates/loop/ironclaw_agent_loop/src/executor/capabilities.rs changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in CapabilityStage::process at line 64. 4 of those changes were fix/bug commits, and the other 38 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/loop/ironclaw_agent_loop/src/executor/capabilities.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:523— crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 113 in useChatEvents.applyProjectionItems at line 523. 4 of those changes were fix/bug commits, and the other 23 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/kernel/ironclaw_host_runtime/src/first_party_tools/schemas.rs crates/kernel/ironclaw_host_runtime/src/first_party_tools/schemas.rs:47— crates/kernel/ironclaw_host_runtime/src/first_party_tools/schemas.rs changed 44 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in ironclaw_host_runtime::first_party_tools::schemas::resolve_builtin_input_schema_ref at line 47. 6 of those changes were fix/bug commits, and the other 38 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/kernel/ironclaw_host_runtime/src/first_party_tools/schemas.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/product/ironclaw_webui/frontend/src/pages/chat/components/message-bubble.tsx crates/product/ironclaw_webui/frontend/src/pages/chat/components/message-bubble.tsx:124— crates/product/ironclaw_webui/frontend/src/pages/chat/components/message-bubble.tsx changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 98 in message-bubble.MessageBubbleImpl at line 124. 2 of those changes were fix/bug commits, and the other 24 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/product/ironclaw_webui/frontend/src/pages/chat/components/message-bubble.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: scripts/reborn_webui_v2_live_qa/run_live_qa.py scripts/reborn_webui_v2_live_qa/run_live_qa.py:5657— scripts/reborn_webui_v2_live_qa/run_live_qa.py changed 47 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in run_live_qa._slack_delivery_routine_case at line 5657. 20 of those changes were fix/bug commits, and the other 27 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- scripts/reborn_webui_v2_live_qa/run_live_qa.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: tools/ironclaw_stress/src/main.rs tools/ironclaw_stress/src/main.rs:1124— tools/ironclaw_stress/src/main.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 106 in ironclaw_stress::validate_args at line 1124. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- tools/ironclaw_stress/src/main.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/product/ironclaw_webui/frontend/src/pages/chat/components/chat-input.tsx crates/product/ironclaw_webui/frontend/src/pages/chat/components/chat-input.tsx:30— crates/product/ironclaw_webui/frontend/src/pages/chat/components/chat-input.tsx changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 119 in chat-input.ChatInput at line 30. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/product/ironclaw_webui/frontend/src/pages/chat/components/chat-input.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/loop/ironclaw_loop_host/src/capability_port.rs crates/loop/ironclaw_loop_host/src/capability_port.rs:2444— crates/loop/ironclaw_loop_host/src/capability_port.rs changed 57 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in HostRuntimeLoopCapabilityPort::invoke_capability_dispatch at line 2444. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/loop/ironclaw_loop_host/src/capability_port.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx:44— crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 75 in configure-modal.ConfigureModal at line 44. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/loop/ironclaw_loop_host/src/lib.rs crates/loop/ironclaw_loop_host/src/lib.rs:2011— crates/loop/ironclaw_loop_host/src/lib.rs changed 68 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in ThreadBackedLoopModelPort::resolve_model_messages at line 2011. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/loop/ironclaw_loop_host/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts:463— crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in useExtensions.useOauthSetup at line 463. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/product/ironclaw_webui/src/webui_v2/handlers.rs crates/product/ironclaw_webui/src/webui_v2/handlers.rs:1584— crates/product/ironclaw_webui/src/webui_v2/handlers.rs changed 66 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in ironclaw_webui::webui_v2::handlers::build_sse_stream at line 1584. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/product/ironclaw_webui/src/webui_v2/handlers.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/app/ironclaw_cli/src/commands/serve.rs crates/app/ironclaw_cli/src/commands/serve.rs:120— crates/app/ironclaw_cli/src/commands/serve.rs changed 43 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in ServeCommand::execute at line 120. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/app/ironclaw_cli/src/commands/serve.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/app/ironclaw_config/src/config_file.rs crates/app/ironclaw_config/src/config_file.rs:961— crates/app/ironclaw_config/src/config_file.rs changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 63 in RebornConfigFile::validate at line 961. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/app/ironclaw_config/src/config_file.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/loop/ironclaw_turn_runner/src/loop_driver_host.rs crates/loop/ironclaw_turn_runner/src/loop_driver_host.rs:1591— crates/loop/ironclaw_turn_runner/src/loop_driver_host.rs changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in RebornLoopDriverHostFactory::build_text_only_host_with_capabilities at line 1591. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/loop/ironclaw_turn_runner/src/loop_driver_host.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/product/ironclaw_assistant/src/run_delivery/observer.rs crates/product/ironclaw_assistant/src/run_delivery/observer.rs:445— crates/product/ironclaw_assistant/src/run_delivery/observer.rs changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in RunDeliveryObserver::deliver_final_reply at line 445. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/product/ironclaw_assistant/src/run_delivery/observer.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/loop/ironclaw_loop_host/src/model_gateway.rs crates/loop/ironclaw_loop_host/src/model_gateway.rs:1585— crates/loop/ironclaw_loop_host/src/model_gateway.rs changed 53 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in ironclaw_loop_host::model_gateway::complete_model_request at line 1585. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/loop/ironclaw_loop_host/src/model_gateway.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/product/ironclaw_assistant/src/run_delivery/triggered.rs crates/product/ironclaw_assistant/src/run_delivery/triggered.rs:507— crates/product/ironclaw_assistant/src/run_delivery/triggered.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in ironclaw_assistant::run_delivery::triggered::notify_background_run at line 507. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/product/ironclaw_assistant/src/run_delivery/triggered.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useHistory.ts crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useHistory.ts:75— crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useHistory.ts changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in useHistory.useHistory at line 75. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useHistory.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChannelOnboarding.ts crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChannelOnboarding.ts:207— crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChannelOnboarding.ts changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 104 in useChannelOnboarding.useChannelOnboarding at line 207. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChannelOnboarding.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
FunctionTooLong: ironclaw_composition::runtime::build_runtime_with_resource_governor crates/app/ironclaw_composition/src/runtime.rs:3111— FunctionTooLong — ironclaw_composition::runtime::build_runtime_with_resource_governor runs 1184 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 1084 over it, 11.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ironclaw_host_runtime::first_party_tools::schemas::resolve_builtin_input_schema_ref crates/kernel/ironclaw_host_runtime/src/first_party_tools/schemas.rs:47— FunctionTooLong — ironclaw_host_runtime::first_party_tools::schemas::resolve_builtin_input_schema_ref runs 773 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 673 over it, 7.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: useChat.useChat crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChat.ts:153— FunctionTooLong — useChat runs 692 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 592 over it, 6.92× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: chat-input.ChatInput crates/product/ironclaw_webui/frontend/src/pages/chat/components/chat-input.tsx:30— FunctionTooLong — ChatInput runs 616 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 516 over it, 6.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: github_tool::dispatch::execute_inner crates/extensions/packages/github/wasm-src/src/dispatch.rs:6— FunctionTooLong — github_tool::dispatch::execute_inner runs 487 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 387 over it, 4.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: configure-modal.ConfigureModal crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx:44— FunctionTooLong — ConfigureModal runs 422 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 322 over it, 4.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: chat.Chat crates/product/ironclaw_webui/frontend/src/pages/chat/chat.tsx:106— FunctionTooLong — Chat runs 370 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 270 over it, 3.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ironclaw_extension_registry::v3::parse_v3 crates/extensions/ironclaw_extension_registry/src/v3.rs:254— FunctionTooLong — ironclaw_extension_registry::v3::parse_v3 runs 358 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 258 over it, 3.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ironclaw_assistant::run_delivery::triggered::notify_background_run crates/product/ironclaw_assistant/src/run_delivery/triggered.rs:507— FunctionTooLong — ironclaw_assistant::run_delivery::triggered::notify_background_run runs 348 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 248 over it, 3.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: device-link-panel.DeviceLinkPanel crates/product/ironclaw_webui/frontend/src/components/device-link-panel.tsx:90— FunctionTooLong — DeviceLinkPanel runs 307 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 207 over it, 3.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: model-selection-policy-editor.ModelSelectionPolicyEditor crates/product/ironclaw_webui/frontend/src/pages/settings/components/model-selection-policy-editor.tsx:53— FunctionTooLong — ModelSelectionPolicyEditor runs 304 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 204 over it, 3.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: message-bubble.MessageBubbleImpl crates/product/ironclaw_webui/frontend/src/pages/chat/components/message-bubble.tsx:124— FunctionTooLong — MessageBubbleImpl runs 300 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 200 over it, 3.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ironclaw_webui::webui_v2::router::webui_v2_router_with_options crates/product/ironclaw_webui/src/webui_v2/router.rs:231— FunctionTooLong — ironclaw_webui::webui_v2::router::webui_v2_router_with_options runs 291 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 191 over it, 2.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: useChatEvents.applyProjectionItems crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:523— FunctionTooLong — applyProjectionItems runs 285 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 185 over it, 2.85× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ironclaw_stress::validate_args tools/ironclaw_stress/src/main.rs:1124— FunctionTooLong — ironclaw_stress::validate_args runs 280 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 180 over it, 2.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: select-menu.SelectMenu crates/product/ironclaw_webui/frontend/src/design-system/select-menu.tsx:229— FunctionTooLong — SelectMenu runs 278 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 178 over it, 2.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ironclaw_loop_host::model_gateway::complete_model_request crates/loop/ironclaw_loop_host/src/model_gateway.rs:1585— FunctionTooLong — ironclaw_loop_host::model_gateway::complete_model_request runs 274 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 174 over it, 2.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: automation-detail-panel.AutomationDetailPanel crates/product/ironclaw_webui/frontend/src/pages/automations/components/automation-detail-panel.tsx:38— FunctionTooLong — AutomationDetailPanel runs 265 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 165 over it, 2.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: message-list.MessageList crates/product/ironclaw_webui/frontend/src/pages/chat/components/message-list.tsx:123— FunctionTooLong — MessageList runs 262 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 162 over it, 2.62× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: useInspector.useInspector crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/useInspector.ts:137— FunctionTooLong — useInspector runs 254 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 154 over it, 2.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: logs-page.LogsPage crates/product/ironclaw_webui/frontend/src/pages/logs/logs-page.tsx:121— FunctionTooLong — LogsPage runs 251 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 151 over it, 2.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: useSSE.useSSE crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useSSE.ts:117— FunctionTooLong — useSSE runs 241 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 141 over it, 2.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: trace-commons-tab.TraceCommonsTab crates/product/ironclaw_webui/frontend/src/pages/settings/components/trace-commons-tab.tsx:103— FunctionTooLong — TraceCommonsTab runs 236 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 136 over it, 2.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: useHistory.useHistory crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useHistory.ts:75— FunctionTooLong — useHistory runs 228 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 128 over it, 2.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: user-secrets-panel.UserSecretsPanelView crates/product/ironclaw_webui/frontend/src/pages/admin/components/user-secrets-panel.tsx:15— FunctionTooLong — UserSecretsPanelView runs 226 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 126 over it, 2.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CapabilityStage.process crates/loop/ironclaw_agent_loop/src/executor/capabilities.rs:64— MethodTooLong — process runs 554 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 454 over it, 5.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CapabilityHost.resume_spawn_json crates/kernel/ironclaw_capabilities/src/host/spawn_resume.rs:34— MethodTooLong — resume_spawn_json runs 369 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 269 over it, 3.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RebornLoopDriverHostFactory.build_text_only_host_with_capabilities crates/loop/ironclaw_turn_runner/src/loop_driver_host.rs:1591— MethodTooLong — build_text_only_host_with_capabilities runs 367 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 267 over it, 3.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: HostRuntimeLoopCapabilityPort.invoke_capability_dispatch crates/loop/ironclaw_loop_host/src/capability_port.rs:2444— MethodTooLong — invoke_capability_dispatch runs 356 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 256 over it, 3.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DefaultExecutorPipeline.execute crates/loop/ironclaw_agent_loop/src/executor/canonical.rs:17— MethodTooLong — execute runs 335 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 235 over it, 3.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RunDeliveryObserver.deliver_final_reply crates/product/ironclaw_assistant/src/run_delivery/observer.rs:445— MethodTooLong — deliver_final_reply runs 333 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 233 over it, 3.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: GsuiteExecutor.dispatch crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:134— MethodTooLong — dispatch runs 321 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 221 over it, 3.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: UserTurnServices.run_operation_inner tools/ironclaw_stress/src/user_turn.rs:1038— MethodTooLong — run_operation_inner runs 313 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 213 over it, 3.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ServeCommand.execute crates/app/ironclaw_cli/src/commands/serve.rs:120— MethodTooLong — execute runs 305 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 205 over it, 3.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RebornServices.query crates/product/ironclaw_assistant/src/reborn_services.rs:4465— MethodTooLong — query runs 298 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 198 over it, 2.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: FirstPartyRuntimeAdapter.dispatch_json crates/kernel/ironclaw_host_runtime/src/services/runtime_adapters.rs:668— MethodTooLong — dispatch_json runs 289 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 189 over it, 2.89× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CapabilityHost.authorize crates/kernel/ironclaw_capabilities/src/host/authorize.rs:268— MethodTooLong — authorize runs 272 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 172 over it, 2.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ModelStage.process crates/loop/ironclaw_agent_loop/src/executor/model.rs:58— MethodTooLong — process runs 270 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 170 over it, 2.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CapabilityHost.auth_resume_json crates/kernel/ironclaw_capabilities/src/host/auth_resume.rs:43— MethodTooLong — auth_resume_json runs 260 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 160 over it, 2.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: LibSqlRootFilesystem.ensure_index REDACTED:433— MethodTooLong — ensure_index runs 248 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 148 over it, 2.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CapabilityStage.handle_capability_error crates/loop/ironclaw_agent_loop/src/executor/capability_dispatch.rs:468— MethodTooLong — handle_capability_error runs 245 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 145 over it, 2.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: HostRuntimeServices.validate_production_wiring crates/kernel/ironclaw_host_runtime/src/services/production_services.rs:21— MethodTooLong — validate_production_wiring runs 243 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 143 over it, 2.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CapabilityHost.authorize_spawn crates/kernel/ironclaw_capabilities/src/host/spawn.rs:207— MethodTooLong — authorize_spawn runs 227 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 127 over it, 2.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ProductCommandHandler.invoke crates/product/ironclaw_assistant/src/reborn_services/product_capability_handlers.rs:99— MethodTooLong — invoke runs 223 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 123 over it, 2.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CapabilityHost.dispatch_resumed_capability crates/kernel/ironclaw_capabilities/src/host/resume_support.rs:308— MethodTooLong — dispatch_resumed_capability runs 204 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 104 over it, 2.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CapabilityStage.handle_capability_outcome crates/loop/ironclaw_agent_loop/src/executor/capability_dispatch.rs:196— MethodTooLong — handle_capability_outcome runs 204 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 104 over it, 2.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: LibSqlTriggerRepository.run_migrations crates/domains/ironclaw_triggers/src/libsql.rs:92— MethodTooLong — run_migrations runs 202 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 102 over it, 2.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: HostedMcpPreparationService.attempt_hosted_mcp_preparation crates/extensions/ironclaw_extension_host/src/hosted_mcp_preparation.rs:419— MethodTooLong — attempt_hosted_mcp_preparation runs 202 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 102 over it, 2.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ThreadBackedLoopModelPort.stream_model crates/loop/ironclaw_loop_host/src/lib.rs:1714— MethodTooLong — stream_model runs 196 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 96 over it, 1.96× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RebornRuntime.submit_user_turn crates/app/ironclaw_composition/src/runtime.rs:2226— MethodTooLong — submit_user_turn runs 193 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 93 over it, 1.93× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (8 lines × 2) crates/app/ironclaw_cli/src/commands/config/set.rs:391— crates/app/ironclaw_cli/src/commands/config/set.rs:391-398 | crates/app/ironclaw_cli/src/commands/config/set.rs:411-418 — 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.
Duplicated block (8 lines × 2) crates/app/ironclaw_cli/src/commands/onboard/prompts.rs:175— crates/app/ironclaw_cli/src/commands/onboard/prompts.rs:175-182 | crates/app/ironclaw_cli/src/commands/onboard/prompts.rs:195-202 — 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.
Duplicated block (8 lines × 2) crates/app/ironclaw_cli/src/commands/traces/mod.rs:1470— crates/app/ironclaw_cli/src/commands/traces/mod.rs:1470-1477 | crates/domains/ironclaw_trace_commons/src/contribution/submission.rs:697-704 — before extracting anything, compare `crates/app/ironclaw_cli/src/commands/traces/mod.rs` and `crates/domains/ironclaw_trace_commons/src/contribution/submission.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) crates/app/ironclaw_composition/src/root/product_live_adapters.rs:112— crates/app/ironclaw_composition/src/root/product_live_adapters.rs:112-122 | crates/app/ironclaw_composition/src/runtime/capability_host.rs:816-823 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) crates/contracts/ironclaw_extension_contracts/src/device_link.rs:441— crates/contracts/ironclaw_extension_contracts/src/device_link.rs:441-448 | crates/contracts/ironclaw_extension_contracts/src/linked_session.rs:187-194 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) crates/contracts/ironclaw_extension_contracts/src/runtime.rs:144— crates/contracts/ironclaw_extension_contracts/src/runtime.rs:144-151 | crates/extensions/ironclaw_extension_registry/src/v2.rs:667-674 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) crates/contracts/ironclaw_host_api/src/audit.rs:62— crates/contracts/ironclaw_host_api/src/audit.rs:62-69 | crates/contracts/ironclaw_host_api/src/audit.rs:93-100 — 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.
Duplicated block (8 lines × 2) crates/domains/ironclaw_auth/src/credential.rs:1100— crates/domains/ironclaw_auth/src/credential.rs:1100-1107 | crates/domains/ironclaw_auth/src/domain.rs:430-437 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) crates/domains/ironclaw_auth/src/product_auth/api/auth.rs:1068— crates/domains/ironclaw_auth/src/product_auth/api/auth.rs:1068-1075 | crates/domains/ironclaw_auth/src/product_prompt.rs:364-371 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) crates/domains/ironclaw_llm/src/circuit_breaker.rs:181— crates/domains/ironclaw_llm/src/circuit_breaker.rs:181-188 | crates/domains/ironclaw_llm/src/circuit_breaker.rs:220-227 — 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.
Duplicated block (8 lines × 2) crates/domains/ironclaw_llm/src/gemini_oauth.rs:860— crates/domains/ironclaw_llm/src/gemini_oauth.rs:860-867 | crates/domains/ironclaw_llm/src/gemini_oauth.rs:900-907 — 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.
Duplicated block (8 lines × 2) crates/domains/ironclaw_outbound/src/outbound_state_store.rs:848— crates/domains/ironclaw_outbound/src/outbound_state_store.rs:848-855 | crates/domains/ironclaw_outbound/src/outbound_state_store.rs:911-918 — 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.
Duplicated block (8 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service.rs:2403— crates/domains/ironclaw_threads/src/filesystem_service.rs:2403-2410 | crates/domains/ironclaw_threads/src/in_memory.rs:424-431 — before extracting anything, compare `crates/domains/ironclaw_threads/src/filesystem_service.rs` and `crates/domains/ironclaw_threads/src/in_memory.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service.rs:3361— crates/domains/ironclaw_threads/src/filesystem_service.rs:3361-3368 | crates/domains/ironclaw_threads/src/filesystem_service.rs:3431-3438 — 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.
Duplicated block (8 lines × 2) crates/domains/ironclaw_threads/src/in_memory.rs:884— crates/domains/ironclaw_threads/src/in_memory.rs:884-891 | crates/domains/ironclaw_threads/src/in_memory.rs:1342-1349 — 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.
Duplicated block (8 lines × 2) crates/domains/ironclaw_threads/src/tool_result_records.rs:307— crates/domains/ironclaw_threads/src/tool_result_records.rs:307-314 | crates/domains/ironclaw_threads/src/tool_result_records.rs:378-385 — 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.
Duplicated block (8 lines × 2) crates/domains/ironclaw_triggers/src/in_memory.rs:181— crates/domains/ironclaw_triggers/src/in_memory.rs:181-188 | crates/domains/ironclaw_triggers/src/in_memory.rs:207-214 — 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.
Duplicated block (8 lines × 2) crates/extensions/ironclaw_extension_host/src/nearai_mcp.rs:47— crates/extensions/ironclaw_extension_host/src/nearai_mcp.rs:47-54 | crates/product/ironclaw_operator/src/llm_admin/nearai_mcp.rs:46-53 — before extracting anything, compare `crates/extensions/ironclaw_extension_host/src/nearai_mcp.rs` and `crates/product/ironclaw_operator/src/llm_admin/nearai_mcp.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) crates/extensions/ironclaw_extension_host/src/hosted_mcp_manifest.rs:398— crates/extensions/ironclaw_extension_host/src/hosted_mcp_manifest.rs:398-405 | crates/extensions/ironclaw_extension_registry/src/hosted_mcp_discovery.rs:50-57 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) crates/extensions/ironclaw_extension_support/src/coding/text.rs:29— crates/extensions/ironclaw_extension_support/src/coding/text.rs:29-36 | crates/extensions/ironclaw_extension_support/src/coding/text.rs:83-90 — 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.
Duplicated block (8 lines × 2) crates/extensions/ironclaw_extension_support/src/skills/url_install/github.rs:323— crates/extensions/ironclaw_extension_support/src/skills/url_install/github.rs:323-330 | crates/extensions/ironclaw_extension_support/src/skills/url_install/github.rs:345-352 — 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.
Duplicated block (8 lines × 2) crates/extensions/packages/github/wasm-src/src/api/issues.rs:188— crates/extensions/packages/github/wasm-src/src/api/issues.rs:188-195 | crates/extensions/packages/github/wasm-src/src/api/issues.rs:238-245 — 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.
Duplicated block (8 lines × 2) crates/extensions/packages/slack/src/attachment_transfer.rs:179— crates/extensions/packages/slack/src/attachment_transfer.rs:179-186 | crates/extensions/packages/telegram/src/attachment_transfer.rs:141-148 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) crates/kernel/ironclaw_resources/src/cas_snapshot.rs:177— crates/kernel/ironclaw_resources/src/cas_snapshot.rs:177-184 | crates/kernel/ironclaw_resources/src/cas_snapshot.rs:213-220 — 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.
Duplicated block (8 lines × 2) crates/loop/ironclaw_agent_loop/src/executor/capability_helpers.rs:120— crates/loop/ironclaw_agent_loop/src/executor/capability_helpers.rs:120-127 | crates/loop/ironclaw_agent_loop/src/executor/capability_helpers.rs:640-647 — 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.
Duplicated block (9 lines × 2) crates/app/ironclaw_cli/src/commands/service/systemd.rs:245— crates/app/ironclaw_cli/src/commands/service/systemd.rs:245-253 | crates/app/ironclaw_cli/src/commands/service/systemd.rs:267-275 — 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.
Duplicated block (9 lines × 2) crates/app/ironclaw_composition/src/factory/auth_engine_assembly.rs:494— crates/app/ironclaw_composition/src/factory/auth_engine_assembly.rs:494-502 | crates/kernel/ironclaw_host_runtime/src/egress/host_port.rs:215-223 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) crates/app/ironclaw_composition/src/product_capability.rs:474— crates/app/ironclaw_composition/src/product_capability.rs:474-482 | crates/loop/ironclaw_loop_host/src/capability_port.rs:4026-4034 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) crates/app/ironclaw_composition/src/product_capability.rs:530— crates/app/ironclaw_composition/src/product_capability.rs:530-538 | crates/app/ironclaw_composition/src/product_capability.rs:572-580 — 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.
Duplicated block (9 lines × 2) crates/contracts/ironclaw_extension_contracts/src/reply.rs:756— crates/contracts/ironclaw_extension_contracts/src/reply.rs:756-764 | crates/contracts/ironclaw_extension_contracts/src/reply.rs:797-805 — 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.
Duplicated block (9 lines × 2) crates/contracts/ironclaw_host_api/src/turn.rs:367— crates/contracts/ironclaw_host_api/src/turn.rs:367-375 | crates/contracts/ironclaw_host_api/src/turn.rs:736-744 — 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.
Duplicated block (9 lines × 2) crates/contracts/ironclaw_loop_contracts/src/resolver.rs:355— crates/contracts/ironclaw_loop_contracts/src/resolver.rs:355-363 | crates/contracts/ironclaw_loop_contracts/src/snapshot.rs:93-101 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) crates/domains/ironclaw_auth/src/engine/mod.rs:535— crates/domains/ironclaw_auth/src/engine/mod.rs:535-543 | crates/domains/ironclaw_auth/src/engine/mod.rs:599-607 — 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.
Duplicated block (9 lines × 2) crates/domains/ironclaw_auth/src/fakes.rs:583— crates/domains/ironclaw_auth/src/fakes.rs:583-591 | crates/domains/ironclaw_auth/src/fakes.rs:705-713 — 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.
Duplicated block (9 lines × 2) crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:759— crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:759-767 | crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:844-852 — 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.
Duplicated block (9 lines × 2) crates/domains/ironclaw_auth/src/product_auth/durable/accounts.rs:113— crates/domains/ironclaw_auth/src/product_auth/durable/accounts.rs:113-121 | crates/domains/ironclaw_auth/src/product_auth/durable/accounts.rs:265-273 — 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.
Duplicated block (9 lines × 2) crates/domains/ironclaw_llm/src/codex_chatgpt.rs:1084— crates/domains/ironclaw_llm/src/codex_chatgpt.rs:1084-1092 | crates/domains/ironclaw_llm/src/openai_codex_provider.rs:870-878 — before extracting anything, compare `crates/domains/ironclaw_llm/src/codex_chatgpt.rs` and `crates/domains/ironclaw_llm/src/openai_codex_provider.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) crates/domains/ironclaw_llm/src/nearai_chat.rs:516— crates/domains/ironclaw_llm/src/nearai_chat.rs:516-524 | crates/domains/ironclaw_llm/src/nearai_chat.rs:634-642 — 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.
Duplicated block (9 lines × 2) crates/domains/ironclaw_skills/src/management/install_bundle.rs:418— crates/domains/ironclaw_skills/src/management/install_bundle.rs:418-426 | crates/extensions/ironclaw_extension_manager/src/ironhub/catalog.rs:377-385 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service.rs:2411— crates/domains/ironclaw_threads/src/filesystem_service.rs:2411-2419 | crates/domains/ironclaw_threads/src/in_memory.rs:452-460 — before extracting anything, compare `crates/domains/ironclaw_threads/src/filesystem_service.rs` and `crates/domains/ironclaw_threads/src/in_memory.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service.rs:2878— crates/domains/ironclaw_threads/src/filesystem_service.rs:2878-2886 | crates/domains/ironclaw_threads/src/filesystem_service.rs:2984-2992 — 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.
Duplicated block (9 lines × 2) crates/extensions/ironclaw_extension_host/src/channel_config.rs:116— crates/extensions/ironclaw_extension_host/src/channel_config.rs:116-124 | crates/extensions/ironclaw_extension_host/src/channel_outbound_targets.rs:61-69 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) crates/extensions/ironclaw_extension_host/src/generic_host.rs:548— crates/extensions/ironclaw_extension_host/src/generic_host.rs:548-556 | crates/extensions/ironclaw_extension_registry/src/package.rs:378-386 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) crates/extensions/ironclaw_extension_host/src/nearai_mcp.rs:26— crates/extensions/ironclaw_extension_host/src/nearai_mcp.rs:26-34 | crates/product/ironclaw_operator/src/llm_admin/nearai_mcp.rs:25-33 — before extracting anything, compare `crates/extensions/ironclaw_extension_host/src/nearai_mcp.rs` and `crates/product/ironclaw_operator/src/llm_admin/nearai_mcp.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) crates/extensions/ironclaw_extension_manager/src/admin_configuration_capability.rs:37— crates/extensions/ironclaw_extension_manager/src/admin_configuration_capability.rs:37-45 | crates/extensions/ironclaw_extension_manager/src/skill_auto_activate_capability.rs:30-38 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) crates/extensions/ironclaw_extension_support/src/coding/file.rs:674— crates/extensions/ironclaw_extension_support/src/coding/file.rs:674-682 | crates/extensions/ironclaw_extension_support/src/coding/grep_tool.rs:259-267 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) crates/extensions/packages/google-drive/wasm-src/src/api.rs:361— crates/extensions/packages/google-drive/wasm-src/src/api.rs:361-369 | crates/extensions/packages/google-drive/wasm-src/src/api.rs:492-500 — 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.
Duplicated block (9 lines × 2) crates/kernel/ironclaw_approvals/src/approval_store.rs:238— crates/kernel/ironclaw_approvals/src/approval_store.rs:238-246 | crates/kernel/ironclaw_approvals/src/approval_store.rs:345-353 — 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.
Duplicated block (9 lines × 2) crates/kernel/ironclaw_approvals/src/capability_permission.rs:294— crates/kernel/ironclaw_approvals/src/capability_permission.rs:294-302 | crates/kernel/ironclaw_approvals/src/policy.rs:321-329 — before extracting anything, compare `crates/kernel/ironclaw_approvals/src/capability_permission.rs` and `crates/kernel/ironclaw_approvals/src/policy.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) crates/kernel/ironclaw_processes/src/invocation_state.rs:593— crates/kernel/ironclaw_processes/src/invocation_state.rs:593-601 | crates/kernel/ironclaw_processes/src/invocation_state.rs:631-639 — 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.
Duplicated block (10 lines × 2) crates/app/ironclaw_cli/src/commands/config/set.rs:394— crates/app/ironclaw_cli/src/commands/config/set.rs:394-403 | crates/app/ironclaw_cli/src/commands/onboard/llm_credentials.rs:97-106 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) crates/app/ironclaw_cli/src/first_party/gsuite.rs:124— crates/app/ironclaw_cli/src/first_party/gsuite.rs:124-133 | crates/extensions/ironclaw_extension_host/src/test_support/first_party_registrars.rs:135-144 — before extracting anything, compare `crates/app/ironclaw_cli/src/first_party/gsuite.rs` and `crates/extensions/ironclaw_extension_host/src/test_support/first_party_registrars.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) crates/app/ironclaw_composition/src/capability_authorization.rs:237— crates/app/ironclaw_composition/src/capability_authorization.rs:237-246 | crates/app/ironclaw_composition/src/capability_authorization.rs:293-302 — 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.
Duplicated block (10 lines × 2) crates/app/ironclaw_composition/src/root/profile.rs:88— crates/app/ironclaw_composition/src/root/profile.rs:88-97 | crates/app/ironclaw_config/src/profile.rs:134-143 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) crates/app/ironclaw_composition/src/support/fs/mount_filesystem_reader.rs:140— crates/app/ironclaw_composition/src/support/fs/mount_filesystem_reader.rs:140-149 | crates/app/ironclaw_composition/src/support/fs/mount_filesystem_reader.rs:181-190 — 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.
Duplicated block (10 lines × 2) crates/contracts/ironclaw_product_contracts/src/descriptors.rs:68— crates/contracts/ironclaw_product_contracts/src/descriptors.rs:68-77 | crates/contracts/ironclaw_product_contracts/src/descriptors.rs:113-122 — 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.
Duplicated block (10 lines × 2) crates/domains/ironclaw_auth/src/fakes.rs:250— crates/domains/ironclaw_auth/src/fakes.rs:250-259 | crates/domains/ironclaw_auth/src/fakes.rs:1201-1210 — 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.
Duplicated block (10 lines × 2) crates/domains/ironclaw_auth/src/fakes.rs:847— crates/domains/ironclaw_auth/src/fakes.rs:847-856 | crates/domains/ironclaw_auth/src/product_auth/durable/accounts.rs:148-157 — before extracting anything, compare `crates/domains/ironclaw_auth/src/fakes.rs` and `crates/domains/ironclaw_auth/src/product_auth/durable/accounts.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) crates/domains/ironclaw_auth/src/fakes.rs:941— crates/domains/ironclaw_auth/src/fakes.rs:941-950 | crates/domains/ironclaw_auth/src/product_auth/durable/accounts.rs:233-242 — before extracting anything, compare `crates/domains/ironclaw_auth/src/fakes.rs` and `crates/domains/ironclaw_auth/src/product_auth/durable/accounts.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) crates/domains/ironclaw_auth/src/fakes.rs:1529— crates/domains/ironclaw_auth/src/fakes.rs:1529-1538 | crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:947-956 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:140— crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:140-149 | crates/domains/ironclaw_identity/src/identity_store.rs:99-108 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:386— crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:386-395 | crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:414-423 — 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.
Duplicated block (10 lines × 2) crates/domains/ironclaw_llm/src/circuit_breaker.rs:282— crates/domains/ironclaw_llm/src/circuit_breaker.rs:282-291 | crates/domains/ironclaw_llm/src/retry.rs:55-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) crates/domains/ironclaw_llm/src/openai_codex_session.rs:593— crates/domains/ironclaw_llm/src/openai_codex_session.rs:593-602 | crates/domains/ironclaw_llm/src/session.rs:389-398 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) crates/domains/ironclaw_trace_commons/src/contribution/canonical.rs:137— crates/domains/ironclaw_trace_commons/src/contribution/canonical.rs:137-146 | crates/domains/ironclaw_trace_commons/src/contribution/canonical.rs:275-284 — 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.
Duplicated block (10 lines × 2) crates/events/ironclaw_event_projections/src/runtime_projection.rs:258— crates/events/ironclaw_event_projections/src/runtime_projection.rs:258-267 | crates/events/ironclaw_event_projections/src/runtime_projection.rs:306-315 — 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.
Duplicated block (10 lines × 2) crates/events/ironclaw_event_store/src/durable_log.rs:90— crates/events/ironclaw_event_store/src/durable_log.rs:90-99 | crates/events/ironclaw_event_store/src/durable_log.rs:381-390 — 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.
Duplicated block (10 lines × 2) crates/events/ironclaw_event_streams/src/manager.rs:91— crates/events/ironclaw_event_streams/src/manager.rs:91-100 | crates/events/ironclaw_event_streams/src/manager.rs:116-125 — 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.
Duplicated block (10 lines × 2) crates/events/ironclaw_event_streams/src/types.rs:302— crates/events/ironclaw_event_streams/src/types.rs:302-311 | crates/events/ironclaw_event_streams/src/types.rs:328-337 — 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.
Duplicated block (10 lines × 2) crates/extensions/ironclaw_extension_host/src/activation_transaction.rs:239— crates/extensions/ironclaw_extension_host/src/activation_transaction.rs:239-248 | crates/extensions/ironclaw_extension_host/src/activation_transaction.rs:284-293 — 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.
Duplicated block (10 lines × 2) crates/extensions/ironclaw_extension_host/src/active.rs:263— crates/extensions/ironclaw_extension_host/src/active.rs:263-272 | crates/extensions/ironclaw_extension_host/src/deployment_channels.rs:93-102 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:1289— crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:1289-1298 | crates/extensions/ironclaw_extension_support/src/web_access.rs:1253-1262 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) crates/extensions/ironclaw_extension_support/src/web_access.rs:683— crates/extensions/ironclaw_extension_support/src/web_access.rs:683-692 | crates/extensions/ironclaw_extension_support/src/web_access.rs:752-761 — 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.
Duplicated block (10 lines × 2) crates/extensions/packages/memory-native/src/filesystem.rs:342— crates/extensions/packages/memory-native/src/filesystem.rs:342-351 | crates/extensions/packages/memory-native/src/filesystem.rs:735-744 — 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.
Duplicated block (10 lines × 2) crates/kernel/ironclaw_approvals/src/auto_approve.rs:197— crates/kernel/ironclaw_approvals/src/auto_approve.rs:197-206 | crates/kernel/ironclaw_approvals/src/cas_record.rs:93-102 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
ClassTooLong: RebornServices crates/product/ironclaw_assistant/src/reborn_services.rs:2502— ClassTooLong — 3039 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 181 methods, 8 blocks, lines 2502-6923. The bar is 400 significant lines; this is 2639 over it, 7.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: FilesystemSessionThreadService crates/domains/ironclaw_threads/src/filesystem_service.rs:229— ClassTooLong — 2724 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 72 methods, 4 blocks, lines 229-3987. The bar is 400 significant lines; this is 2324 over it, 6.81× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ExtensionInstallationStore crates/extensions/ironclaw_extension_registry/src/installations.rs:1291— ClassTooLong — 1977 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 65 methods, 4 blocks, lines 1291-4015. The bar is 400 significant lines; this is 1577 over it, 4.94× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ExtensionLifecycleManager crates/extensions/ironclaw_extension_host/src/product_lifecycle.rs:137— ClassTooLong — 1658 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 64 methods, 3 blocks, lines 137-2862. The bar is 400 significant lines; this is 1258 over it, 4.15× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RebornRuntime crates/app/ironclaw_composition/src/runtime.rs:601— ClassTooLong — 1542 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 66 methods, 4 blocks, lines 601-3049. The bar is 400 significant lines; this is 1142 over it, 3.86× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: LibSqlRootFilesystem REDACTED:30— ClassTooLong — 1383 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 14 methods, 4 blocks, lines 30-2637. The bar is 400 significant lines; this is 983 over it, 3.46× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: InMemorySessionThreadService crates/domains/ironclaw_threads/src/in_memory.rs:43— ClassTooLong — 1235 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 0 methods, 3 blocks, lines 43-1768. The bar is 400 significant lines; this is 835 over it, 3.09× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: HostRuntimeLoopCapabilityPort crates/loop/ironclaw_loop_host/src/capability_port.rs:1111— ClassTooLong — 1233 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 38 methods, 4 blocks, lines 1111-2980. The bar is 400 significant lines; this is 833 over it, 3.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: OutboundStateStore crates/domains/ironclaw_outbound/src/outbound_state_store.rs:223— ClassTooLong — 1180 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 16 methods, 7 blocks, lines 223-2314. The bar is 400 significant lines; this is 780 over it, 2.95× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: HookDispatcher crates/loop/ironclaw_hooks/src/dispatch/mod.rs:234— ClassTooLong — 1160 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 64 methods, 2 blocks, lines 234-2141. The bar is 400 significant lines; this is 760 over it, 2.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: LibSqlTriggerRepository crates/domains/ironclaw_triggers/src/libsql.rs:78— ClassTooLong — 1148 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 5 methods, 3 blocks, lines 78-1572. The bar is 400 significant lines; this is 748 over it, 2.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RunDeliveryObserver crates/product/ironclaw_assistant/src/run_delivery/observer.rs:218— ClassTooLong — 1067 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 23 methods, 3 blocks, lines 218-1856. The bar is 400 significant lines; this is 667 over it, 2.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: InMemoryConversationServices crates/domains/ironclaw_conversations/src/memory.rs:35— ClassTooLong — 1066 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 14 methods, 8 blocks, lines 35-1391. The bar is 400 significant lines; this is 666 over it, 2.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ProcessJournalMaterializedState crates/kernel/ironclaw_processes/src/journal_store/state.rs:53— ClassTooLong — 1028 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 32 methods, 3 blocks, lines 53-1490. The bar is 400 significant lines; this is 628 over it, 2.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PostgresTriggerRepository crates/domains/ironclaw_triggers/src/postgres.rs:48— ClassTooLong — 994 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 3 methods, 3 blocks, lines 48-1246. The bar is 400 significant lines; this is 594 over it, 2.49× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: InMemoryAuthProductServices crates/domains/ironclaw_auth/src/fakes.rs:107— ClassTooLong — 977 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 12 methods, 10 blocks, lines 107-1511. The bar is 400 significant lines; this is 577 over it, 2.44× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RebornProductAuthServices crates/domains/ironclaw_auth/src/product_auth/api/auth.rs:589— ClassTooLong — 924 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 54 methods, 5 blocks, lines 589-2081. The bar is 400 significant lines; this is 524 over it, 2.31× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ProcessJournalStore crates/kernel/ironclaw_processes/src/journal_store.rs:175— ClassTooLong — 910 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 24 methods, 15 blocks, lines 151-1491. The bar is 400 significant lines; this is 510 over it, 2.28× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PostgresRootFilesystem REDACTED:78— ClassTooLong — 897 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 10 methods, 4 blocks, lines 78-1436. The bar is 400 significant lines; this is 497 over it, 2.24× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: GeminiOauthProvider crates/domains/ironclaw_llm/src/gemini_oauth.rs:930— ClassTooLong — 829 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 12 methods, 3 blocks, lines 930-2277. The bar is 400 significant lines; this is 429 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ToolDisclosureCapabilityPort crates/loop/ironclaw_loop_host/src/tool_disclosure_port.rs:121— ClassTooLong — 821 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 25 methods, 3 blocks, lines 121-1548. The bar is 400 significant lines; this is 421 over it, 2.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: UserTurnServices tools/ironclaw_stress/src/user_turn.rs:168— ClassTooLong — 807 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 14 methods, 2 blocks, lines 168-1827. The bar is 400 significant lines; this is 407 over it, 2.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RebornLoopDriverHostFactory crates/loop/ironclaw_turn_runner/src/loop_driver_host.rs:1031— ClassTooLong — 748 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 36 methods, 5 blocks, lines 1031-2795. The bar is 400 significant lines; this is 348 over it, 1.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: OpenAiResponsesWorkflow crates/product/ironclaw_openai_compat/src/responses_workflow.rs:70— ClassTooLong — 742 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 31 methods, 2 blocks, lines 70-1029. The bar is 400 significant lines; this is 342 over it, 1.86× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AwaitEdgeResolver crates/loop/ironclaw_turn_runner/src/subagent/await_edge/resolver.rs:52— ClassTooLong — 739 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 23 methods, 6 blocks, lines 52-1368. The bar is 400 significant lines; this is 339 over it, 1.85× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (7 lines × 2) crates/app/ironclaw_cli/src/commands/service/mod.rs:524— crates/app/ironclaw_cli/src/commands/service/mod.rs:524-530 | crates/app/ironclaw_cli/src/commands/service/mod.rs:535-541 — 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.
Duplicated block (7 lines × 2) crates/app/ironclaw_cli/src/commands/traces/mod.rs:1745— crates/app/ironclaw_cli/src/commands/traces/mod.rs:1745-1751 | crates/domains/ironclaw_trace_commons/src/contribution/queue.rs:1215-1221 — before extracting anything, compare `crates/app/ironclaw_cli/src/commands/traces/mod.rs` and `crates/domains/ironclaw_trace_commons/src/contribution/queue.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) crates/app/ironclaw_composition/src/root/product_live_adapters.rs:148— crates/app/ironclaw_composition/src/root/product_live_adapters.rs:148-154 | crates/app/ironclaw_composition/src/root/product_live_adapters.rs:192-198 — 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.
Duplicated block (7 lines × 2) crates/app/ironclaw_composition/src/support/fs/mount_filesystem_reader.rs:157— crates/app/ironclaw_composition/src/support/fs/mount_filesystem_reader.rs:157-163 | crates/product/ironclaw_assistant/src/scoped_fs/project_filesystem_reader.rs:135-144 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) crates/contracts/ironclaw_loop_contracts/src/content_digest.rs:41— crates/contracts/ironclaw_loop_contracts/src/content_digest.rs:41-47 | crates/loop/ironclaw_agent_loop/src/state/signature.rs:65-73 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) crates/domains/ironclaw_auth/src/fakes.rs:351— crates/domains/ironclaw_auth/src/fakes.rs:351-357 | crates/domains/ironclaw_auth/src/fakes.rs:565-571 — 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.
Duplicated block (7 lines × 2) crates/domains/ironclaw_auth/src/fakes.rs:1021— crates/domains/ironclaw_auth/src/fakes.rs:1021-1027 | crates/domains/ironclaw_auth/src/fakes.rs:1048-1054 — 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.
Duplicated block (7 lines × 2) crates/domains/ironclaw_auth/src/product_auth/api/auth.rs:1690— crates/domains/ironclaw_auth/src/product_auth/api/auth.rs:1690-1696 | crates/domains/ironclaw_auth/src/product_auth/oauth/oauth_gate.rs:288-294 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) crates/domains/ironclaw_llm/src/anthropic_oauth.rs:1000— crates/domains/ironclaw_llm/src/anthropic_oauth.rs:1000-1006 | crates/domains/ironclaw_llm/src/anthropic_oauth.rs:1036-1042 — 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.
Duplicated block (7 lines × 2) crates/domains/ironclaw_llm/src/smart_routing.rs:471— crates/domains/ironclaw_llm/src/smart_routing.rs:471-477 | crates/domains/ironclaw_llm/src/smart_routing.rs:764-770 — 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.
Duplicated block (7 lines × 2) crates/extensions/ironclaw_extension_manager/src/ironhub/service.rs:385— crates/extensions/ironclaw_extension_manager/src/ironhub/service.rs:385-391 | crates/extensions/ironclaw_extension_manager/src/ironhub/service.rs:392-398 — 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.
Duplicated block (7 lines × 2) crates/extensions/ironclaw_extension_support/src/coding/glob_tool.rs:90— crates/extensions/ironclaw_extension_support/src/coding/glob_tool.rs:90-96 | crates/extensions/ironclaw_extension_support/src/coding/grep_tool.rs:256-262 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) crates/extensions/ironclaw_extension_support/src/latency.rs:116— crates/extensions/ironclaw_extension_support/src/latency.rs:116-122 | crates/extensions/ironclaw_extension_support/src/latency.rs:149-155 — 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.
Duplicated block (7 lines × 2) crates/extensions/packages/github/wasm-src/src/api/issues.rs:246— crates/extensions/packages/github/wasm-src/src/api/issues.rs:246-252 | crates/extensions/packages/github/wasm-src/src/api/pulls.rs:173-179 — before extracting anything, compare `crates/extensions/packages/github/wasm-src/src/api/issues.rs` and `crates/extensions/packages/github/wasm-src/src/api/pulls.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) crates/extensions/packages/github/wasm-src/src/response.rs:17— crates/extensions/packages/github/wasm-src/src/response.rs:17-23 | crates/extensions/packages/github/wasm-src/src/response.rs:50-56 — 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.
Duplicated block (7 lines × 2) crates/extensions/packages/telegram/src/linked/ops/people.rs:125— crates/extensions/packages/telegram/src/linked/ops/people.rs:125-131 | crates/extensions/packages/telegram/src/linked/ops/people.rs:243-249 — 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.
Duplicated block (7 lines × 2) crates/kernel/ironclaw_processes/src/journal_store/rows.rs:1272— crates/kernel/ironclaw_processes/src/journal_store/rows.rs:1272-1278 | crates/kernel/ironclaw_processes/src/journal_store/rows.rs:1386-1392 — 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.
Duplicated block (7 lines × 2) crates/kernel/ironclaw_turns/src/process_projection/runtime.rs:221— crates/kernel/ironclaw_turns/src/process_projection/runtime.rs:221-227 | crates/kernel/ironclaw_turns/src/process_projection/runtime.rs:333-339 — 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.
Duplicated block (7 lines × 2) crates/lanes/ironclaw_sandbox/src/sandbox_process/managed_egress.rs:1157— crates/lanes/ironclaw_sandbox/src/sandbox_process/managed_egress.rs:1157-1163 | crates/lanes/ironclaw_sandbox/src/sandbox_process/user_container.rs:421-427 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) crates/loop/ironclaw_agent_loop/src/executor/mapping.rs:217— crates/loop/ironclaw_agent_loop/src/executor/mapping.rs:217-223 | crates/loop/ironclaw_agent_loop/src/executor/mapping.rs:257-263 — 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.
Duplicated block (7 lines × 2) crates/loop/ironclaw_hooks/src/dispatch/mod.rs:1660— crates/loop/ironclaw_hooks/src/dispatch/mod.rs:1660-1666 | crates/loop/ironclaw_hooks/src/dispatch/mod.rs:1668-1674 — 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.
Duplicated block (7 lines × 2) crates/loop/ironclaw_hooks/src/dispatch/mod.rs:1747— crates/loop/ironclaw_hooks/src/dispatch/mod.rs:1747-1753 | crates/loop/ironclaw_hooks/src/dispatch/mod.rs:1755-1761 — 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.
Duplicated block (7 lines × 2) crates/loop/ironclaw_hooks/src/predicate_state.rs:831— crates/loop/ironclaw_hooks/src/predicate_state.rs:831-837 | crates/loop/ironclaw_hooks/src/predicate_state.rs:922-928 — 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.
Duplicated block (7 lines × 2) crates/loop/ironclaw_loop_host/src/filesystem_skill_bundle_source.rs:440— crates/loop/ironclaw_loop_host/src/filesystem_skill_bundle_source.rs:440-446 | crates/loop/ironclaw_loop_host/src/filesystem_skill_bundle_source.rs:473-479 — 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.
Duplicated block (7 lines × 2) crates/loop/ironclaw_turn_runner/src/subagent/await_edge/store.rs:324— crates/loop/ironclaw_turn_runner/src/subagent/await_edge/store.rs:324-330 | crates/loop/ironclaw_turn_runner/src/subagent/await_edge/store.rs:366-372 — 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.
Duplicated block (13 lines × 2) crates/app/ironclaw_cli/src/commands/service/launchd.rs:120— crates/app/ironclaw_cli/src/commands/service/launchd.rs:120-132 | crates/product/ironclaw_operator/src/operator_service_lifecycle.rs:896-908 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13 lines × 2) crates/app/ironclaw_cli/src/first_party/gsuite.rs:219— crates/app/ironclaw_cli/src/first_party/gsuite.rs:219-231 | crates/extensions/ironclaw_extension_host/src/test_support/first_party_registrars.rs:202-214 — before extracting anything, compare `crates/app/ironclaw_cli/src/first_party/gsuite.rs` and `crates/extensions/ironclaw_extension_host/src/test_support/first_party_registrars.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) crates/app/ironclaw_composition/src/factory/production_backend_assembly.rs:1176— crates/app/ironclaw_composition/src/factory/production_backend_assembly.rs:1176-1188 | crates/app/ironclaw_composition/src/product_surface.rs:195-207 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13 lines × 2) crates/domains/ironclaw_auth/src/engine/exchange.rs:80— crates/domains/ironclaw_auth/src/engine/exchange.rs:80-92 | crates/domains/ironclaw_auth/src/engine/exchange.rs:158-170 — 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.
Duplicated block (13 lines × 2) crates/domains/ironclaw_auth/src/fakes.rs:710— crates/domains/ironclaw_auth/src/fakes.rs:710-722 | crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:633-645 — before extracting anything, compare `crates/domains/ironclaw_auth/src/fakes.rs` and `crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) crates/domains/ironclaw_extractors/src/lib.rs:640— crates/domains/ironclaw_extractors/src/lib.rs:640-652 | crates/domains/ironclaw_extractors/src/lib.rs:684-696 — 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.
Duplicated block (13 lines × 2) crates/domains/ironclaw_llm/src/github_copilot.rs:359— crates/domains/ironclaw_llm/src/github_copilot.rs:359-371 | crates/domains/ironclaw_llm/src/nearai_chat.rs:1112-1124 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (13 lines × 2) crates/domains/ironclaw_llm/src/provider.rs:1348— crates/domains/ironclaw_llm/src/provider.rs:1348-1360 | crates/domains/ironclaw_llm/src/provider.rs:1371-1383 — 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.
Duplicated block (13 lines × 2) crates/domains/ironclaw_llm/src/smart_routing.rs:500— crates/domains/ironclaw_llm/src/smart_routing.rs:500-512 | crates/domains/ironclaw_llm/src/smart_routing.rs:811-823 — 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.
Duplicated block (13 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service.rs:3025— crates/domains/ironclaw_threads/src/filesystem_service.rs:3025-3037 | crates/domains/ironclaw_threads/src/in_memory.rs:961-973 — before extracting anything, compare `crates/domains/ironclaw_threads/src/filesystem_service.rs` and `crates/domains/ironclaw_threads/src/in_memory.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service.rs:4503— crates/domains/ironclaw_threads/src/filesystem_service.rs:4503-4515 | crates/domains/ironclaw_threads/src/in_memory.rs:1864-1876 — before extracting anything, compare `crates/domains/ironclaw_threads/src/filesystem_service.rs` and `crates/domains/ironclaw_threads/src/in_memory.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) crates/domains/ironclaw_trace_commons/src/contribution/maintenance.rs:513— crates/domains/ironclaw_trace_commons/src/contribution/maintenance.rs:513-525 | crates/domains/ironclaw_trace_commons/src/contribution/remote/claim.rs:304-316 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13 lines × 2) crates/domains/ironclaw_trace_commons/src/contribution/notice.rs:153— crates/domains/ironclaw_trace_commons/src/contribution/notice.rs:153-165 | crates/domains/ironclaw_trace_commons/src/contribution/notice.rs:182-194 — 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.
Duplicated block (13 lines × 2) crates/domains/ironclaw_triggers/src/postgres.rs:812— crates/domains/ironclaw_triggers/src/postgres.rs:812-824 | crates/domains/ironclaw_triggers/src/postgres.rs:894-906 — 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.
Duplicated block (13 lines × 2) crates/events/ironclaw_event_projections/src/lib.rs:580— crates/events/ironclaw_event_projections/src/lib.rs:580-592 | crates/events/ironclaw_event_projections/src/lib.rs:750-762 — 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.
Duplicated block (13 lines × 2) crates/events/ironclaw_event_streams/src/manager.rs:152— crates/events/ironclaw_event_streams/src/manager.rs:152-164 | crates/events/ironclaw_event_streams/src/manager.rs:201-213 — 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.
Duplicated block (13 lines × 2) crates/extensions/ironclaw_extension_registry/src/installations.rs:1977— crates/extensions/ironclaw_extension_registry/src/installations.rs:1977-1989 | crates/extensions/ironclaw_extension_registry/src/installations.rs:3192-3204 — 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.
Duplicated block (13 lines × 2) crates/extensions/ironclaw_extension_registry/src/installations.rs:2306— crates/extensions/ironclaw_extension_registry/src/installations.rs:2306-2318 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2400-2412 — 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.
Duplicated block (13 lines × 2) crates/extensions/ironclaw_extension_registry/src/installations.rs:2533— crates/extensions/ironclaw_extension_registry/src/installations.rs:2533-2545 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2595-2607 — 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.
Duplicated block (13 lines × 2) crates/extensions/packages/google-slides/wasm-src/src/api.rs:561— crates/extensions/packages/google-slides/wasm-src/src/api.rs:561-573 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:599-611 — 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.
Duplicated block (13 lines × 2) crates/extensions/packages/memory-native/src/backend.rs:447— crates/extensions/packages/memory-native/src/backend.rs:447-459 | crates/extensions/packages/memory-native/src/backend.rs:765-777 — 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.
Duplicated block (13 lines × 2) crates/extensions/packages/memory-native/src/filesystem.rs:415— crates/extensions/packages/memory-native/src/filesystem.rs:415-427 | crates/extensions/packages/memory-native/src/filesystem.rs:824-836 — 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.
Duplicated block (13 lines × 2) crates/kernel/ironclaw_approvals/src/capability_permission.rs:442— crates/kernel/ironclaw_approvals/src/capability_permission.rs:442-454 | crates/kernel/ironclaw_approvals/src/policy.rs:500-512 — before extracting anything, compare `crates/kernel/ironclaw_approvals/src/capability_permission.rs` and `crates/kernel/ironclaw_approvals/src/policy.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) crates/kernel/ironclaw_processes/src/capability_process.rs:131— crates/kernel/ironclaw_processes/src/capability_process.rs:131-143 | crates/kernel/ironclaw_processes/src/host.rs:45-57 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (13 lines × 2) crates/kernel/ironclaw_resources/src/lib.rs:2208— crates/kernel/ironclaw_resources/src/lib.rs:2208-2220 | crates/kernel/ironclaw_resources/src/lib.rs:2279-2291 — 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.
Duplicated block (11 lines × 2) crates/app/ironclaw_cli/src/commands/traces/mod.rs:1488— crates/app/ironclaw_cli/src/commands/traces/mod.rs:1488-1498 | crates/domains/ironclaw_trace_commons/src/contribution/submission.rs:716-726 — before extracting anything, compare `crates/app/ironclaw_cli/src/commands/traces/mod.rs` and `crates/domains/ironclaw_trace_commons/src/contribution/submission.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) crates/app/ironclaw_cli/src/first_party/gsuite.rs:135— crates/app/ironclaw_cli/src/first_party/gsuite.rs:135-145 | crates/extensions/ironclaw_extension_host/src/test_support/first_party_registrars.rs:146-156 — before extracting anything, compare `crates/app/ironclaw_cli/src/first_party/gsuite.rs` and `crates/extensions/ironclaw_extension_host/src/test_support/first_party_registrars.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) crates/domains/ironclaw_auth/src/credential.rs:1002— crates/domains/ironclaw_auth/src/credential.rs:1002-1012 | crates/domains/ironclaw_auth/src/product_auth/durable/accounts.rs:136-146 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) crates/domains/ironclaw_auth/src/engine/mod.rs:508— crates/domains/ironclaw_auth/src/engine/mod.rs:508-518 | crates/domains/ironclaw_auth/src/engine/mod.rs:577-587 — 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.
Duplicated block (11 lines × 2) crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:289— crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:289-299 | crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:449-459 — 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.
Duplicated block (11 lines × 2) crates/domains/ironclaw_llm/src/anthropic_oauth.rs:380— crates/domains/ironclaw_llm/src/anthropic_oauth.rs:380-390 | crates/domains/ironclaw_llm/src/openai_codex_provider.rs:272-282 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service.rs:4516— crates/domains/ironclaw_threads/src/filesystem_service.rs:4516-4526 | crates/domains/ironclaw_threads/src/in_memory.rs:1878-1888 — before extracting anything, compare `crates/domains/ironclaw_threads/src/filesystem_service.rs` and `crates/domains/ironclaw_threads/src/in_memory.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) crates/domains/ironclaw_threads/src/in_memory.rs:1291— crates/domains/ironclaw_threads/src/in_memory.rs:1291-1301 | crates/domains/ironclaw_threads/src/in_memory.rs:1365-1375 — 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.
Duplicated block (11 lines × 2) crates/domains/ironclaw_triggers/src/libsql.rs:467— crates/domains/ironclaw_triggers/src/libsql.rs:467-477 | crates/domains/ironclaw_triggers/src/libsql.rs:1666-1676 — 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.
Duplicated block (11 lines × 2) crates/domains/ironclaw_web_app/src/store.rs:146— crates/domains/ironclaw_web_app/src/store.rs:146-156 | crates/domains/ironclaw_web_app/src/store.rs:202-212 — 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.
Duplicated block (11 lines × 2) crates/extensions/ironclaw_extension_host/src/admin_configuration_store.rs:819— crates/extensions/ironclaw_extension_host/src/admin_configuration_store.rs:819-829 | crates/extensions/ironclaw_extension_host/src/admin_configuration_store.rs:843-853 — 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.
Duplicated block (11 lines × 2) crates/extensions/ironclaw_extension_support/src/web_access.rs:661— crates/extensions/ironclaw_extension_support/src/web_access.rs:661-671 | crates/extensions/ironclaw_extension_support/src/web_access.rs:730-740 — 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.
Duplicated block (11 lines × 2) crates/extensions/packages/github/wasm-src/src/api/issues.rs:227— crates/extensions/packages/github/wasm-src/src/api/issues.rs:227-237 | crates/extensions/packages/github/wasm-src/src/api/pulls.rs:157-167 — before extracting anything, compare `crates/extensions/packages/github/wasm-src/src/api/issues.rs` and `crates/extensions/packages/github/wasm-src/src/api/pulls.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) crates/extensions/packages/github/wasm-src/src/validation.rs:25— crates/extensions/packages/github/wasm-src/src/validation.rs:25-35 | crates/extensions/packages/slack/wasm-src/src/api.rs:165-175 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) crates/extensions/packages/memory-native/src/indexer.rs:160— crates/extensions/packages/memory-native/src/indexer.rs:160-170 | crates/extensions/packages/memory-native/src/indexer.rs:206-216 — 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.
Duplicated block (11 lines × 2) crates/extensions/packages/slack/src/attachment_transfer.rs:253— crates/extensions/packages/slack/src/attachment_transfer.rs:253-263 | crates/extensions/packages/slack/src/attachment_transfer.rs:298-308 — 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.
Duplicated block (11 lines × 2) crates/extensions/packages/slack/wasm-src/src/api.rs:865— crates/extensions/packages/slack/wasm-src/src/api.rs:865-875 | crates/extensions/packages/slack/wasm-src/src/api.rs:891-901 — 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.
Duplicated block (11 lines × 2) crates/kernel/ironclaw_processes/src/journal_store.rs:596— crates/kernel/ironclaw_processes/src/journal_store.rs:596-606 | crates/kernel/ironclaw_processes/src/journal_store/flusher.rs:442-452 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) crates/kernel/ironclaw_processes/src/journal_store/rows.rs:973— crates/kernel/ironclaw_processes/src/journal_store/rows.rs:973-983 | crates/kernel/ironclaw_processes/src/journal_store/rows.rs:1087-1097 — 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.
Duplicated block (11 lines × 2) crates/kernel/ironclaw_turns/src/process_projection/runtime.rs:240— crates/kernel/ironclaw_turns/src/process_projection/runtime.rs:240-250 | crates/kernel/ironclaw_turns/src/process_projection/runtime.rs:353-363 — 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.
Duplicated block (11 lines × 2) crates/loop/ironclaw_loop_host/src/external_tool_capability.rs:325— crates/loop/ironclaw_loop_host/src/external_tool_capability.rs:325-335 | crates/loop/ironclaw_loop_host/src/synthetic_capability.rs:290-300 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) crates/loop/ironclaw_loop_host/src/model_gateway.rs:656— crates/loop/ironclaw_loop_host/src/model_gateway.rs:656-666 | crates/loop/ironclaw_loop_host/src/model_gateway.rs:1003-1013 — 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.
Duplicated block (11 lines × 2) crates/product/ironclaw_assistant/src/run_outcome_observer.rs:293— crates/product/ironclaw_assistant/src/run_outcome_observer.rs:293-303 | crates/product/ironclaw_assistant/src/run_outcome_observer.rs:565-578 — 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.
Duplicated block (11 lines × 2) crates/product/ironclaw_assistant/src/workflow.rs:1303— crates/product/ironclaw_assistant/src/workflow.rs:1303-1313 | crates/product/ironclaw_assistant/src/workflow.rs:1362-1372 — 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.
Duplicated block (11 lines × 2) crates/product/ironclaw_openai_compat/src/chat_workflow.rs:234— crates/product/ironclaw_openai_compat/src/chat_workflow.rs:234-245 | crates/product/ironclaw_openai_compat/src/chat_workflow.rs:396-406 — 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.
Duplicated block (6 lines × 2) crates/domains/ironclaw_conversations/src/memory.rs:479— crates/domains/ironclaw_conversations/src/memory.rs:479-484 | crates/domains/ironclaw_conversations/src/memory.rs:576-581 — 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.
Duplicated block (6 lines × 2) crates/domains/ironclaw_llm/src/anthropic_oauth.rs:475— crates/domains/ironclaw_llm/src/anthropic_oauth.rs:475-480 | crates/domains/ironclaw_llm/src/anthropic_oauth.rs:524-529 — 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.
Duplicated block (6 lines × 2) crates/domains/ironclaw_llm/src/codex_chatgpt.rs:380— crates/domains/ironclaw_llm/src/codex_chatgpt.rs:380-385 | crates/domains/ironclaw_llm/src/openai_codex_provider.rs:148-153 — before extracting anything, compare `crates/domains/ironclaw_llm/src/codex_chatgpt.rs` and `crates/domains/ironclaw_llm/src/openai_codex_provider.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) crates/domains/ironclaw_llm/src/openai_codex_provider.rs:819— crates/domains/ironclaw_llm/src/openai_codex_provider.rs:819-824 | crates/domains/ironclaw_llm/src/openai_codex_provider.rs:834-839 — 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.
Duplicated block (6 lines × 2) crates/domains/ironclaw_threads/src/in_memory.rs:1059— crates/domains/ironclaw_threads/src/in_memory.rs:1059-1064 | crates/domains/ironclaw_threads/src/in_memory.rs:1114-1119 — 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.
Duplicated block (6 lines × 2) crates/extensions/ironclaw_extension_support/src/latency.rs:125— crates/extensions/ironclaw_extension_support/src/latency.rs:125-130 | crates/extensions/ironclaw_extension_support/src/latency.rs:158-163 — 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.
Duplicated block (6 lines × 2) crates/extensions/packages/google-docs/wasm-src/src/api.rs:283— crates/extensions/packages/google-docs/wasm-src/src/api.rs:283-288 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:234-239 — before extracting anything, compare `crates/extensions/packages/google-docs/wasm-src/src/api.rs` and `crates/extensions/packages/google-slides/wasm-src/src/api.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) crates/extensions/packages/memory-native/src/repo/in_memory.rs:60— crates/extensions/packages/memory-native/src/repo/in_memory.rs:60-65 | crates/extensions/packages/memory-native/src/repo/in_memory.rs:121-126 — 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.
Duplicated block (6 lines × 2) crates/extensions/packages/slack/src/attachment_transfer.rs:615— crates/extensions/packages/slack/src/attachment_transfer.rs:615-620 | crates/extensions/packages/slack/src/attachment_transfer.rs:635-640 — 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.
Duplicated block (6 lines × 2) crates/kernel/ironclaw_host_runtime/src/memory_context.rs:349— crates/kernel/ironclaw_host_runtime/src/memory_context.rs:349-354 | crates/loop/ironclaw_turn_runner/src/after_turn_memory.rs:222-227 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) crates/kernel/ironclaw_processes/src/journal_store.rs:624— crates/kernel/ironclaw_processes/src/journal_store.rs:624-629 | crates/kernel/ironclaw_processes/src/journal_store/flusher.rs:493-498 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) crates/kernel/ironclaw_resources/src/lib.rs:1006— crates/kernel/ironclaw_resources/src/lib.rs:1006-1011 | crates/kernel/ironclaw_resources/src/lib.rs:1033-1038 — 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.
Duplicated block (6 lines × 2) crates/kernel/ironclaw_turns/src/host_managed_ports/prompt.rs:41— crates/kernel/ironclaw_turns/src/host_managed_ports/prompt.rs:41-46 | crates/loop/ironclaw_loop_host/src/lib.rs:262-267 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) crates/loop/ironclaw_loop_host/src/tool_disclosure_port.rs:1299— crates/loop/ironclaw_loop_host/src/tool_disclosure_port.rs:1299-1304 | crates/loop/ironclaw_loop_host/src/tool_disclosure_port.rs:1347-1352 — 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.
Duplicated block (6 lines × 2) crates/product/ironclaw_assistant/src/channel_workflow.rs:211— crates/product/ironclaw_assistant/src/channel_workflow.rs:211-216 | crates/product/ironclaw_assistant/src/channel_workflow.rs:483-488 — 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.
Duplicated block (6 lines × 2) crates/product/ironclaw_assistant/src/reborn_services.rs:6220— crates/product/ironclaw_assistant/src/reborn_services.rs:6220-6225 | crates/product/ironclaw_assistant/src/reborn_services.rs:6260-6265 — 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.
Duplicated block (6 lines × 2) REDACTED:329— REDACTED:329-334 | REDACTED:1779-1784 — 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.
Duplicated block (6 lines × 2) crates/substrates/ironclaw_filesystem/src/local.rs:533— crates/substrates/ironclaw_filesystem/src/local.rs:533-538 | crates/substrates/ironclaw_filesystem/src/local.rs:574-579 — 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.
Duplicated block (6 lines × 2) crates/substrates/ironclaw_secrets/src/secret_store.rs:1106— crates/substrates/ironclaw_secrets/src/secret_store.rs:1106-1111 | crates/substrates/ironclaw_secrets/src/secret_store.rs:1131-1136 — 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.
Duplicated block (6 lines × 2) tools/ironclaw_stress/src/analysis.rs:80— tools/ironclaw_stress/src/analysis.rs:80-85 | tools/ironclaw_stress/src/capture.rs:38-43 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) tools/ironclaw_stress/src/ramp.rs:123— tools/ironclaw_stress/src/ramp.rs:123-128 | tools/ironclaw_stress/src/sweep.rs:214-219 — before extracting anything, compare `tools/ironclaw_stress/src/ramp.rs` and `tools/ironclaw_stress/src/sweep.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) tools/ironclaw_stress/src/suite.rs:334— tools/ironclaw_stress/src/suite.rs:334-339 | tools/ironclaw_stress/src/suite.rs:369-374 — 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.
Duplicated block (6 lines × 2) tools/ironclaw_stress/src/user_turn.rs:833— tools/ironclaw_stress/src/user_turn.rs:833-838 | tools/ironclaw_stress/src/user_turn.rs:1110-1115 — 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.
Duplicated block (6 lines × 2) tools/ironclaw_stress/src/user_turn.rs:868— tools/ironclaw_stress/src/user_turn.rs:868-873 | tools/ironclaw_stress/src/user_turn.rs:1166-1171 — 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.
Duplicated block (6 lines × 2) crates/app/ironclaw_cli/src/runtime/mod.rs:1316— crates/app/ironclaw_cli/src/runtime/mod.rs:1316-1321 | crates/product/ironclaw_operator/src/llm_admin/llm_config_service.rs:1160-1165 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12 lines × 2) crates/app/ironclaw_composition/src/readiness.rs:195— crates/app/ironclaw_composition/src/readiness.rs:195-206 | crates/kernel/ironclaw_host_runtime/src/services/production_wiring.rs:123-134 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12 lines × 2) crates/contracts/ironclaw_loop_contracts/src/runtime_context.rs:245— crates/contracts/ironclaw_loop_contracts/src/runtime_context.rs:245-256 | crates/contracts/ironclaw_loop_contracts/src/runtime_context.rs:281-292 — 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.
Duplicated block (12 lines × 2) crates/domains/ironclaw_auth/src/fakes.rs:393— crates/domains/ironclaw_auth/src/fakes.rs:393-404 | crates/domains/ironclaw_auth/src/fakes.rs:446-457 — 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.
Duplicated block (12 lines × 2) crates/domains/ironclaw_auth/src/fakes.rs:793— crates/domains/ironclaw_auth/src/fakes.rs:793-804 | crates/domains/ironclaw_auth/src/product_auth/durable/accounts.rs:94-105 — before extracting anything, compare `crates/domains/ironclaw_auth/src/fakes.rs` and `crates/domains/ironclaw_auth/src/product_auth/durable/accounts.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) crates/domains/ironclaw_auth/src/fakes.rs:1169— crates/domains/ironclaw_auth/src/fakes.rs:1169-1180 | crates/domains/ironclaw_auth/src/product_auth/durable/accounts.rs:404-415 — before extracting anything, compare `crates/domains/ironclaw_auth/src/fakes.rs` and `crates/domains/ironclaw_auth/src/product_auth/durable/accounts.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) crates/domains/ironclaw_conversations/src/memory.rs:777— crates/domains/ironclaw_conversations/src/memory.rs:777-788 | crates/domains/ironclaw_conversations/src/memory.rs:835-846 — 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.
Duplicated block (12 lines × 2) crates/domains/ironclaw_llm/src/anthropic_oauth.rs:493— crates/domains/ironclaw_llm/src/anthropic_oauth.rs:493-504 | crates/domains/ironclaw_llm/src/anthropic_oauth.rs:591-602 — 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.
Duplicated block (12 lines × 2) crates/domains/ironclaw_llm/src/failover.rs:464— crates/domains/ironclaw_llm/src/failover.rs:464-475 | crates/domains/ironclaw_llm/src/failover.rs:513-524 — 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.
Duplicated block (12 lines × 2) crates/domains/ironclaw_llm/src/openai_codex_session.rs:467— crates/domains/ironclaw_llm/src/openai_codex_session.rs:467-478 | crates/domains/ironclaw_llm/src/openai_codex_session.rs:574-585 — 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.
Duplicated block (12 lines × 2) crates/domains/ironclaw_llm/src/rig_adapter.rs:1596— crates/domains/ironclaw_llm/src/rig_adapter.rs:1596-1611 | crates/domains/ironclaw_llm/src/rig_adapter.rs:1702-1713 — 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.
Duplicated block (12 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service.rs:3453— crates/domains/ironclaw_threads/src/filesystem_service.rs:3453-3464 | crates/domains/ironclaw_threads/src/filesystem_service.rs:3518-3529 — 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.
Duplicated block (12 lines × 2) crates/domains/ironclaw_triggers/src/libsql.rs:1618— crates/domains/ironclaw_triggers/src/libsql.rs:1618-1629 | crates/domains/ironclaw_triggers/src/postgres.rs:1614-1625 — before extracting anything, compare `crates/domains/ironclaw_triggers/src/libsql.rs` and `crates/domains/ironclaw_triggers/src/postgres.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) crates/extensions/ironclaw_extension_host/src/admin_configuration_service.rs:161— crates/extensions/ironclaw_extension_host/src/admin_configuration_service.rs:161-172 | crates/extensions/ironclaw_extension_host/src/admin_configuration_service.rs:273-284 — 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.
Duplicated block (12 lines × 2) crates/extensions/ironclaw_extension_manager/src/ironhub/package.rs:78— crates/extensions/ironclaw_extension_manager/src/ironhub/package.rs:78-89 | crates/extensions/ironclaw_extension_manager/src/ironhub/package.rs:112-123 — 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.
Duplicated block (12 lines × 2) crates/extensions/ironclaw_extension_registry/src/installations.rs:2097— crates/extensions/ironclaw_extension_registry/src/installations.rs:2097-2108 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2167-2178 — 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.
Duplicated block (12 lines × 2) crates/extensions/packages/github/wasm-src/src/api/contents.rs:118— crates/extensions/packages/github/wasm-src/src/api/contents.rs:118-129 | crates/extensions/packages/github/wasm-src/src/api/contents.rs:175-186 — 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.
Duplicated block (12 lines × 2) crates/extensions/packages/google-sheets/wasm-src/src/api.rs:304— crates/extensions/packages/google-sheets/wasm-src/src/api.rs:304-315 | crates/extensions/packages/google-sheets/wasm-src/src/api.rs:337-348 — 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.
Duplicated block (12 lines × 2) crates/extensions/packages/memory-native/src/filesystem.rs:695— crates/extensions/packages/memory-native/src/filesystem.rs:695-706 | crates/extensions/packages/memory-native/src/filesystem.rs:801-812 — 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.
Duplicated block (12 lines × 2) crates/kernel/ironclaw_processes/src/invocation_state.rs:525— crates/kernel/ironclaw_processes/src/invocation_state.rs:525-536 | crates/kernel/ironclaw_processes/src/invocation_state.rs:562-573 — 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.
Duplicated block (12 lines × 2) crates/kernel/ironclaw_resources/src/filesystem_governor.rs:731— crates/kernel/ironclaw_resources/src/filesystem_governor.rs:731-742 | crates/kernel/ironclaw_resources/src/filesystem_governor.rs:814-825 — 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.
Duplicated block (12 lines × 2) crates/loop/ironclaw_hooks/src/dispatch/mod.rs:532— crates/loop/ironclaw_hooks/src/dispatch/mod.rs:532-543 | crates/loop/ironclaw_hooks/src/dispatch/mod.rs:557-568 — 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.
Duplicated block (12 lines × 2) crates/loop/ironclaw_hooks/src/dispatch/mod.rs:643— crates/loop/ironclaw_hooks/src/dispatch/mod.rs:643-654 | crates/loop/ironclaw_hooks/src/dispatch/mod.rs:666-677 — 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.
Duplicated block (12 lines × 2) crates/loop/ironclaw_hooks/src/evaluator.rs:337— crates/loop/ironclaw_hooks/src/evaluator.rs:337-348 | crates/loop/ironclaw_hooks/src/self_authored.rs:188-199 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (12 lines × 2) crates/loop/ironclaw_hooks/src/wasm/runtime.rs:882— crates/loop/ironclaw_hooks/src/wasm/runtime.rs:882-893 | crates/loop/ironclaw_hooks/src/wasm/runtime.rs:930-941 — 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.
Duplicated block (12 lines × 2) crates/product/ironclaw_assistant/src/workflow.rs:1315— crates/product/ironclaw_assistant/src/workflow.rs:1315-1326 | crates/product/ironclaw_assistant/src/workflow.rs:1486-1497 — 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.
Duplicated block (5 lines × 2) crates/contracts/ironclaw_host_api/src/credential_redaction.rs:75— crates/contracts/ironclaw_host_api/src/credential_redaction.rs:75-79 | crates/contracts/ironclaw_host_api/src/credential_redaction.rs:227-231 — 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.
Duplicated block (5 lines × 2) crates/domains/ironclaw_auth/src/product_auth/api/auth.rs:498— crates/domains/ironclaw_auth/src/product_auth/api/auth.rs:498-502 | crates/domains/ironclaw_auth/src/product_auth/api/auth.rs:759-763 — 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.
Duplicated block (5 lines × 2) crates/domains/ironclaw_llm/src/nearai_chat.rs:933— crates/domains/ironclaw_llm/src/nearai_chat.rs:933-938 | crates/domains/ironclaw_llm/src/nearai_chat.rs:1075-1079 — 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.
Duplicated block (5 lines × 2) crates/domains/ironclaw_llm/src/reasoning.rs:335— crates/domains/ironclaw_llm/src/reasoning.rs:335-339 | crates/domains/ironclaw_llm/src/reasoning.rs:449-453 — 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.
Duplicated block (5 lines × 2) crates/domains/ironclaw_outbound/src/outbound_state_store.rs:1793— crates/domains/ironclaw_outbound/src/outbound_state_store.rs:1793-1797 | crates/domains/ironclaw_outbound/src/outbound_state_store.rs:1807-1811 — 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.
Duplicated block (5 lines × 2) crates/domains/ironclaw_triggers/src/in_memory.rs:315— crates/domains/ironclaw_triggers/src/in_memory.rs:315-319 | crates/domains/ironclaw_triggers/src/in_memory.rs:375-379 — 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.
Duplicated block (5 lines × 2) crates/extensions/packages/google-sheets/wasm-src/src/api.rs:322— crates/extensions/packages/google-sheets/wasm-src/src/api.rs:322-326 | crates/extensions/packages/google-sheets/wasm-src/src/api.rs:356-360 — 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.
Duplicated block (5 lines × 2) crates/loop/ironclaw_agent_loop/src/executor/gates.rs:313— crates/loop/ironclaw_agent_loop/src/executor/gates.rs:313-317 | crates/loop/ironclaw_agent_loop/src/executor/gates.rs:343-347 — 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.
Duplicated block (5 lines × 2) crates/loop/ironclaw_agent_loop/src/executor/latency.rs:37— crates/loop/ironclaw_agent_loop/src/executor/latency.rs:37-41 | crates/loop/ironclaw_agent_loop/src/executor/latency.rs:68-72 — 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.
Duplicated block (5 lines × 2) crates/loop/ironclaw_hooks/src/dispatch/mod.rs:1456— crates/loop/ironclaw_hooks/src/dispatch/mod.rs:1456-1463 | crates/loop/ironclaw_hooks/src/dispatch/mod.rs:1624-1628 — 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.
Duplicated block (5 lines × 2) crates/product/ironclaw_assistant/src/steering.rs:117— crates/product/ironclaw_assistant/src/steering.rs:117-121 | crates/product/ironclaw_assistant/src/steering.rs:162-166 — 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.
Duplicated block (5 lines × 2) REDACTED:1012— REDACTED:1012-1016 | REDACTED:2566-2570 — 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.
Duplicated block (5 lines × 2) crates/substrates/ironclaw_secrets/src/secret_store.rs:309— crates/substrates/ironclaw_secrets/src/secret_store.rs:309-313 | crates/substrates/ironclaw_secrets/src/secret_store.rs:982-986 — 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.
Duplicated block (5 lines × 2) crates/domains/ironclaw_triggers/src/libsql.rs:2190— crates/domains/ironclaw_triggers/src/libsql.rs:2190-2194 | crates/domains/ironclaw_triggers/src/postgres.rs:1655-1659 — before extracting anything, compare `crates/domains/ironclaw_triggers/src/libsql.rs` and `crates/domains/ironclaw_triggers/src/postgres.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) crates/product/ironclaw_webui/src/auth/pending.rs:233— crates/product/ironclaw_webui/src/auth/pending.rs:233-237 | crates/product/ironclaw_webui/src/cli_token_login.rs:371-375 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) crates/product/ironclaw_webui/src/webui_body_limit.rs:98— crates/product/ironclaw_webui/src/webui_body_limit.rs:98-102 | crates/product/ironclaw_webui/src/webui_ws_origin.rs:93-97 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) crates/product/ironclaw_assistant/src/suggestions_store.rs:792— crates/product/ironclaw_assistant/src/suggestions_store.rs:792-796 | crates/product/ironclaw_assistant/src/suggestions_store.rs:936-943 — 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.
Duplicated block (5 lines × 2) crates/domains/ironclaw_llm/src/anthropic_oauth.rs:991— crates/domains/ironclaw_llm/src/anthropic_oauth.rs:991-997 | crates/domains/ironclaw_llm/src/anthropic_oauth.rs:1029-1033 — 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.
Duplicated block (5 lines × 2) tools/ironclaw_stress/src/api_capacity.rs:807— tools/ironclaw_stress/src/api_capacity.rs:807-811 | tools/ironclaw_stress/src/api_capacity.rs:827-832 — 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.
Duplicated block (5 lines × 2) tools/ironclaw_stress/src/main.rs:2254— tools/ironclaw_stress/src/main.rs:2254-2258 | tools/ironclaw_stress/src/process_pressure.rs:37-41 — before extracting anything, compare `tools/ironclaw_stress/src/main.rs` and `tools/ironclaw_stress/src/process_pressure.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) crates/app/ironclaw_config/src/config_file.rs:1002— crates/app/ironclaw_config/src/config_file.rs:1002-1006 | crates/app/ironclaw_config/src/config_file.rs:1133-1137 — 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.
Duplicated block (5 lines × 2) tools/ironclaw_stress/src/api_capacity.rs:826— tools/ironclaw_stress/src/api_capacity.rs:826-830 | tools/ironclaw_stress/src/api_capacity.rs:843-847 — 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.
Duplicated block (5 lines × 2) crates/kernel/ironclaw_host_runtime/src/production.rs:75— crates/kernel/ironclaw_host_runtime/src/production.rs:75-79 | crates/kernel/ironclaw_host_runtime/src/production.rs:99-103 — 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.
Duplicated block (5 lines × 2) crates/app/ironclaw_cli/src/commands/service/systemd.rs:224— crates/app/ironclaw_cli/src/commands/service/systemd.rs:224-228 | crates/app/ironclaw_cli/src/commands/service/systemd.rs:556-560 — 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.
Duplicated block (5 lines × 2) crates/app/ironclaw_cli/src/commands/traces/mod.rs:1738— crates/app/ironclaw_cli/src/commands/traces/mod.rs:1738-1742 | crates/domains/ironclaw_trace_commons/src/contribution/queue.rs:1185-1189 — before extracting anything, compare `crates/app/ironclaw_cli/src/commands/traces/mod.rs` and `crates/domains/ironclaw_trace_commons/src/contribution/queue.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) crates/contracts/ironclaw_product_contracts/src/outbound.rs:466— crates/contracts/ironclaw_product_contracts/src/outbound.rs:466-480 | crates/domains/ironclaw_threads/src/capability_display_preview.rs:52-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (15 lines × 2) crates/domains/ironclaw_auth/src/domain.rs:97— crates/domains/ironclaw_auth/src/domain.rs:97-111 | crates/domains/ironclaw_auth/src/domain.rs:160-174 — 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.
Duplicated block (15 lines × 2) crates/domains/ironclaw_llm/src/openai_codex_session.rs:423— crates/domains/ironclaw_llm/src/openai_codex_session.rs:423-443 | crates/domains/ironclaw_llm/src/openai_codex_session.rs:536-550 — 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.
Duplicated block (15 lines × 2) crates/domains/ironclaw_llm/src/transcription/chat_completions.rs:122— crates/domains/ironclaw_llm/src/transcription/chat_completions.rs:122-136 | crates/domains/ironclaw_llm/src/transcription/openai.rs:105-119 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (15 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service/thread_index.rs:705— crates/domains/ironclaw_threads/src/filesystem_service/thread_index.rs:705-719 | crates/domains/ironclaw_threads/src/filesystem_service/transcript_migration.rs:55-69 — before extracting anything, compare `crates/domains/ironclaw_threads/src/filesystem_service/thread_index.rs` and `crates/domains/ironclaw_threads/src/filesystem_service/transcript_migration.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service.rs:2886— crates/domains/ironclaw_threads/src/filesystem_service.rs:2886-2900 | crates/domains/ironclaw_threads/src/in_memory.rs:845-859 — before extracting anything, compare `crates/domains/ironclaw_threads/src/filesystem_service.rs` and `crates/domains/ironclaw_threads/src/in_memory.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service.rs:2992— crates/domains/ironclaw_threads/src/filesystem_service.rs:2992-3006 | crates/domains/ironclaw_threads/src/in_memory.rs:931-945 — before extracting anything, compare `crates/domains/ironclaw_threads/src/filesystem_service.rs` and `crates/domains/ironclaw_threads/src/in_memory.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service.rs:3146— crates/domains/ironclaw_threads/src/filesystem_service.rs:3146-3160 | crates/domains/ironclaw_threads/src/in_memory.rs:1065-1079 — before extracting anything, compare `crates/domains/ironclaw_threads/src/filesystem_service.rs` and `crates/domains/ironclaw_threads/src/in_memory.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service.rs:3206— crates/domains/ironclaw_threads/src/filesystem_service.rs:3206-3220 | crates/domains/ironclaw_threads/src/in_memory.rs:1120-1134 — before extracting anything, compare `crates/domains/ironclaw_threads/src/filesystem_service.rs` and `crates/domains/ironclaw_threads/src/in_memory.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) crates/domains/ironclaw_trace_commons/src/contribution/capture.rs:374— crates/domains/ironclaw_trace_commons/src/contribution/capture.rs:374-388 | crates/domains/ironclaw_trace_commons/src/contribution/capture.rs:505-519 — 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.
Duplicated block (15 lines × 2) crates/domains/ironclaw_triggers/src/libsql.rs:972— crates/domains/ironclaw_triggers/src/libsql.rs:972-986 | crates/domains/ironclaw_triggers/src/postgres.rs:641-655 — before extracting anything, compare `crates/domains/ironclaw_triggers/src/libsql.rs` and `crates/domains/ironclaw_triggers/src/postgres.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) crates/events/ironclaw_event_log/src/in_memory.rs:254— crates/events/ironclaw_event_log/src/in_memory.rs:254-272 | crates/events/ironclaw_event_log/src/in_memory.rs:363-377 — 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.
Duplicated block (15 lines × 2) crates/extensions/packages/google-docs/wasm-src/src/api.rs:716— crates/extensions/packages/google-docs/wasm-src/src/api.rs:716-730 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:523-537 — before extracting anything, compare `crates/extensions/packages/google-docs/wasm-src/src/api.rs` and `crates/extensions/packages/google-slides/wasm-src/src/api.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) crates/extensions/packages/google-sheets/wasm-src/src/api.rs:88— crates/extensions/packages/google-sheets/wasm-src/src/api.rs:88-102 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:88-102 — before extracting anything, compare `crates/extensions/packages/google-sheets/wasm-src/src/api.rs` and `crates/extensions/packages/google-slides/wasm-src/src/api.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) crates/kernel/ironclaw_host_runtime/src/first_party_tools/mod.rs:312— crates/kernel/ironclaw_host_runtime/src/first_party_tools/mod.rs:312-326 | crates/kernel/ironclaw_host_runtime/src/first_party_tools/mod.rs:391-405 — 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.
Duplicated block (15 lines × 2) crates/kernel/ironclaw_host_runtime/src/first_party_tools/trace_commons.rs:871— crates/kernel/ironclaw_host_runtime/src/first_party_tools/trace_commons.rs:871-885 | crates/kernel/ironclaw_host_runtime/src/first_party_tools/trace_commons.rs:1218-1232 — 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.
Duplicated block (15 lines × 2) crates/loop/ironclaw_hooks/src/dispatch/mod.rs:1421— crates/loop/ironclaw_hooks/src/dispatch/mod.rs:1421-1435 | crates/loop/ironclaw_hooks/src/dispatch/mod.rs:1557-1571 — 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.
Duplicated block (15 lines × 2) crates/loop/ironclaw_loop_host/src/capability_port.rs:1071— crates/loop/ironclaw_loop_host/src/capability_port.rs:1071-1085 | crates/loop/ironclaw_loop_host/src/synthetic_capability.rs:340-354 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (15 lines × 2) crates/loop/ironclaw_loop_host/src/model_gateway.rs:1732— crates/loop/ironclaw_loop_host/src/model_gateway.rs:1732-1746 | crates/loop/ironclaw_loop_host/src/model_gateway.rs:1811-1825 — 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.
Duplicated block (15 lines × 2) crates/product/ironclaw_assistant/src/projection.rs:532— crates/product/ironclaw_assistant/src/projection.rs:532-546 | crates/product/ironclaw_assistant/src/projection.rs:573-587 — 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.
Duplicated block (15 lines × 2) crates/product/ironclaw_openai_compat/src/chat_workflow.rs:592— crates/product/ironclaw_openai_compat/src/chat_workflow.rs:592-606 | crates/product/ironclaw_openai_compat/src/responses_workflow.rs:663-677 — before extracting anything, compare `crates/product/ironclaw_openai_compat/src/chat_workflow.rs` and `crates/product/ironclaw_openai_compat/src/responses_workflow.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) crates/product/ironclaw_openai_compat/src/streaming.rs:255— crates/product/ironclaw_openai_compat/src/streaming.rs:255-269 | crates/product/ironclaw_openai_compat/src/streaming.rs:274-288 — 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.
Duplicated block (15 lines × 2) crates/product/ironclaw_openai_compat/src/streaming.rs:289— crates/product/ironclaw_openai_compat/src/streaming.rs:289-303 | crates/product/ironclaw_openai_compat/src/streaming.rs:308-322 — 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.
Duplicated block (15 lines × 2) REDACTED:796— REDACTED:796-810 | REDACTED:529-543 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 318 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) crates/kernel/ironclaw_capabilities/src/obligations.rs:137— crates/kernel/ironclaw_capabilities/src/obligations.rs:137-151 | crates/kernel/ironclaw_host_runtime/src/obligations/handler.rs:665-679 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (14 lines × 2) crates/app/ironclaw_cli/src/commands/traces/mod.rs:2034— crates/app/ironclaw_cli/src/commands/traces/mod.rs:2034-2047 | crates/domains/ironclaw_trace_commons/src/contribution/queue.rs:1010-1023 — before extracting anything, compare `crates/app/ironclaw_cli/src/commands/traces/mod.rs` and `crates/domains/ironclaw_trace_commons/src/contribution/queue.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) crates/contracts/ironclaw_loop_contracts/src/resolver.rs:332— crates/contracts/ironclaw_loop_contracts/src/resolver.rs:332-345 | crates/contracts/ironclaw_loop_contracts/src/snapshot.rs:76-89 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (14 lines × 2) crates/domains/ironclaw_outbound/src/outbound_state_store.rs:394— crates/domains/ironclaw_outbound/src/outbound_state_store.rs:394-407 | crates/domains/ironclaw_outbound/src/outbound_state_store.rs:1555-1568 — 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.
Duplicated block (14 lines × 2) crates/domains/ironclaw_outbound/src/outbound_state_store.rs:749— crates/domains/ironclaw_outbound/src/outbound_state_store.rs:749-762 | crates/domains/ironclaw_outbound/src/outbound_state_store.rs:802-815 — 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.
Duplicated block (14 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service.rs:1059— crates/domains/ironclaw_threads/src/filesystem_service.rs:1059-1072 | crates/domains/ironclaw_threads/src/filesystem_service.rs:1242-1255 — 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.
Duplicated block (14 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service.rs:1956— crates/domains/ironclaw_threads/src/filesystem_service.rs:1956-1969 | crates/domains/ironclaw_threads/src/filesystem_service.rs:2177-2190 — 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.
Duplicated block (14 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service.rs:4406— crates/domains/ironclaw_threads/src/filesystem_service.rs:4406-4419 | crates/domains/ironclaw_threads/src/in_memory.rs:1847-1860 — before extracting anything, compare `crates/domains/ironclaw_threads/src/filesystem_service.rs` and `crates/domains/ironclaw_threads/src/in_memory.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) crates/domains/ironclaw_trace_commons/src/contribution/capture.rs:359— crates/domains/ironclaw_trace_commons/src/contribution/capture.rs:359-372 | crates/domains/ironclaw_trace_commons/src/contribution/capture.rs:490-503 — 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.
Duplicated block (14 lines × 2) crates/extensions/ironclaw_extension_registry/src/installations.rs:2041— crates/extensions/ironclaw_extension_registry/src/installations.rs:2041-2054 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2117-2130 — 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.
Duplicated block (14 lines × 2) crates/extensions/ironclaw_extension_support/src/gsuite/handlers/gmail_message.rs:219— crates/extensions/ironclaw_extension_support/src/gsuite/handlers/gmail_message.rs:219-232 | crates/extensions/ironclaw_extension_support/src/gsuite/handlers/gmail_message.rs:247-260 — 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.
Duplicated block (14 lines × 2) crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:229— crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:229-242 | crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:383-396 — 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.
Duplicated block (14 lines × 2) crates/extensions/packages/google-docs/wasm-src/src/api.rs:951— crates/extensions/packages/google-docs/wasm-src/src/api.rs:951-964 | crates/extensions/packages/google-docs/wasm-src/src/api.rs:1020-1033 — 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.
Duplicated block (14 lines × 2) crates/extensions/packages/telegram/src/linked/ops/reads.rs:138— crates/extensions/packages/telegram/src/linked/ops/reads.rs:138-151 | crates/extensions/packages/telegram/src/linked/ops/reads.rs:241-254 — 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.
Duplicated block (14 lines × 2) crates/loop/ironclaw_agent_loop/src/executor/capability_helpers.rs:129— crates/loop/ironclaw_agent_loop/src/executor/capability_helpers.rs:129-142 | crates/loop/ironclaw_agent_loop/src/executor/capability_helpers.rs:649-662 — 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.
Duplicated block (14 lines × 2) crates/loop/ironclaw_hooks/src/dispatch/mod.rs:1645— crates/loop/ironclaw_hooks/src/dispatch/mod.rs:1645-1658 | crates/loop/ironclaw_hooks/src/dispatch/mod.rs:1732-1745 — 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.
Duplicated block (14 lines × 2) crates/loop/ironclaw_loop_host/src/durable_input_queue.rs:264— crates/loop/ironclaw_loop_host/src/durable_input_queue.rs:264-277 | crates/loop/ironclaw_loop_host/src/input_queue.rs:833-846 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (14 lines × 2) crates/product/ironclaw_assistant/src/auth_interaction/service.rs:510— crates/product/ironclaw_assistant/src/auth_interaction/service.rs:510-527 | crates/product/ironclaw_assistant/src/auth_interaction/service.rs:549-562 — 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.
Duplicated block (14 lines × 2) crates/product/ironclaw_webui/src/webui_v2/handlers.rs:1180— crates/product/ironclaw_webui/src/webui_v2/handlers.rs:1180-1193 | crates/product/ironclaw_webui/src/webui_v2/handlers.rs:1209-1222 — 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.
Duplicated block (14 lines × 2) REDACTED:908— REDACTED:908-921 | REDACTED:629-642 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 318 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) REDACTED:745— REDACTED:745-758 | REDACTED:783-796 — 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.
Duplicated block (14 lines × 2) crates/substrates/ironclaw_secrets/src/keychain.rs:245— crates/substrates/ironclaw_secrets/src/keychain.rs:245-258 | crates/substrates/ironclaw_secrets/src/keychain.rs:286-299 — 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.
Duplicated block (14 lines × 2) tools/ironclaw_stress/src/suite.rs:121— tools/ironclaw_stress/src/suite.rs:121-134 | tools/ironclaw_stress/src/sweep.rs:199-212 — before extracting anything, compare `tools/ironclaw_stress/src/suite.rs` and `tools/ironclaw_stress/src/sweep.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) crates/domains/ironclaw_llm/src/gemini_oauth.rs:437— crates/domains/ironclaw_llm/src/gemini_oauth.rs:437-450 | crates/domains/ironclaw_llm/src/gemini_oauth.rs:472-485 — 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.
Duplicated block (14 lines × 2) crates/domains/ironclaw_auth/src/product_auth/api/auth.rs:1698— crates/domains/ironclaw_auth/src/product_auth/api/auth.rs:1698-1711 | crates/domains/ironclaw_auth/src/product_auth/oauth/oauth_gate.rs:296-309 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (14 lines × 2) crates/domains/ironclaw_llm/src/lib.rs:683— crates/domains/ironclaw_llm/src/lib.rs:683-696 | crates/domains/ironclaw_llm/src/lib.rs:780-793 — 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.
Duplicated block (16 lines × 2) crates/app/ironclaw_cli/src/commands/service/systemd.rs:268— crates/app/ironclaw_cli/src/commands/service/systemd.rs:268-283 | crates/app/ironclaw_cli/src/commands/service/systemd.rs:513-528 — 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.
Duplicated block (16 lines × 2) crates/app/ironclaw_cli/src/commands/traces/mod.rs:1447— crates/app/ironclaw_cli/src/commands/traces/mod.rs:1447-1462 | crates/domains/ironclaw_trace_commons/src/contribution/submission.rs:673-688 — before extracting anything, compare `crates/app/ironclaw_cli/src/commands/traces/mod.rs` and `crates/domains/ironclaw_trace_commons/src/contribution/submission.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) crates/app/ironclaw_composition/src/capability_authorization.rs:219— crates/app/ironclaw_composition/src/capability_authorization.rs:219-234 | crates/app/ironclaw_composition/src/capability_authorization.rs:307-322 — 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.
Duplicated block (16 lines × 2) crates/extensions/ironclaw_extension_host/src/nearai_mcp.rs:124— crates/extensions/ironclaw_extension_host/src/nearai_mcp.rs:124-139 | crates/product/ironclaw_operator/src/llm_admin/nearai_mcp.rs:174-189 — before extracting anything, compare `crates/extensions/ironclaw_extension_host/src/nearai_mcp.rs` and `crates/product/ironclaw_operator/src/llm_admin/nearai_mcp.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) crates/extensions/ironclaw_extension_manager/src/operator_config_capability.rs:270— crates/extensions/ironclaw_extension_manager/src/operator_config_capability.rs:270-285 | crates/extensions/ironclaw_extension_manager/src/skill_auto_activate_capability.rs:206-221 — before extracting anything, compare `crates/extensions/ironclaw_extension_manager/src/operator_config_capability.rs` and `crates/extensions/ironclaw_extension_manager/src/skill_auto_activate_capability.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) crates/extensions/ironclaw_extension_support/src/web_access.rs:722— crates/extensions/ironclaw_extension_support/src/web_access.rs:722-737 | crates/extensions/ironclaw_extension_support/src/web_access.rs:769-784 — 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.
Duplicated block (16 lines × 2) crates/extensions/packages/github/wasm-src/src/api/contents.rs:135— crates/extensions/packages/github/wasm-src/src/api/contents.rs:135-150 | crates/extensions/packages/github/wasm-src/src/api/contents.rs:189-204 — 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.
Duplicated block (16 lines × 2) crates/extensions/packages/memory-native/src/filesystem.rs:184— crates/extensions/packages/memory-native/src/filesystem.rs:184-199 | crates/extensions/packages/memory-native/src/filesystem.rs:584-599 — 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.
Duplicated block (16 lines × 2) crates/extensions/packages/memory-native/src/repo/filesystem.rs:582— crates/extensions/packages/memory-native/src/repo/filesystem.rs:582-597 | crates/extensions/packages/memory-native/src/repo/filesystem.rs:725-740 — 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.
Duplicated block (16 lines × 2) crates/kernel/ironclaw_host_runtime/src/surface.rs:670— crates/kernel/ironclaw_host_runtime/src/surface.rs:670-685 | crates/loop/ironclaw_loop_host/src/capability_info.rs:275-290 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (16 lines × 2) crates/loop/ironclaw_agent_loop/src/executor/capabilities.rs:198— crates/loop/ironclaw_agent_loop/src/executor/capabilities.rs:198-213 | crates/loop/ironclaw_agent_loop/src/executor/capabilities.rs:235-250 — 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.
Duplicated block (16 lines × 2) crates/loop/ironclaw_agent_loop/src/executor/capability_dispatch.rs:612— crates/loop/ironclaw_agent_loop/src/executor/capability_dispatch.rs:612-627 | crates/loop/ironclaw_agent_loop/src/executor/capability_dispatch.rs:819-834 — 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.
Duplicated block (16 lines × 2) crates/product/ironclaw_assistant/src/delivery_coordinator.rs:551— crates/product/ironclaw_assistant/src/delivery_coordinator.rs:551-566 | crates/product/ironclaw_assistant/src/delivery_coordinator.rs:651-666 — 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.
Duplicated block (16 lines × 2) crates/substrates/ironclaw_secrets/src/secret_store.rs:447— crates/substrates/ironclaw_secrets/src/secret_store.rs:447-462 | crates/substrates/ironclaw_secrets/src/secret_store.rs:479-494 — 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.
Duplicated block (16 lines × 2) crates/loop/ironclaw_loop_host/src/model_gateway.rs:1711— crates/loop/ironclaw_loop_host/src/model_gateway.rs:1711-1728 | crates/loop/ironclaw_loop_host/src/model_gateway.rs:1901-1916 — 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.
Duplicated block (16 lines × 2) crates/kernel/ironclaw_host_runtime/src/production.rs:575— crates/kernel/ironclaw_host_runtime/src/production.rs:575-590 | crates/kernel/ironclaw_host_runtime/src/production.rs:632-647 — 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.
Duplicated block (16 lines × 2) crates/kernel/ironclaw_host_runtime/src/production.rs:1529— crates/kernel/ironclaw_host_runtime/src/production.rs:1529-1544 | crates/kernel/ironclaw_host_runtime/src/production.rs:1547-1562 — 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.
Duplicated block (16 lines × 2) tools/ironclaw_stress/src/user_turn.rs:500— tools/ironclaw_stress/src/user_turn.rs:500-515 | tools/ironclaw_stress/src/user_turn.rs:568-583 — 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.
Duplicated block (16 lines × 2) crates/product/ironclaw_assistant/src/reborn_services.rs:3803— crates/product/ironclaw_assistant/src/reborn_services.rs:3803-3818 | crates/product/ironclaw_assistant/src/reborn_services.rs:3843-3858 — 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.
Duplicated block (16 lines × 2) scripts/workflow_canary/scenarios/_common.py:129— scripts/workflow_canary/scenarios/_common.py:129-144 | scripts/workflow_canary/scenarios/manual_trigger.py:96-111 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) scripts/ci/reborn_pr_test_plan.py:1086— scripts/ci/reborn_pr_test_plan.py:1086-1101 | scripts/ci/reborn_pr_test_plan.py:1113-1128 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:1— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:1 imports highlight.js/lib/core, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:2— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:2 imports highlight.js/lib/languages/bash, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:3— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:3 imports highlight.js/lib/languages/c, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:4— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:4 imports highlight.js/lib/languages/cpp, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:5— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:5 imports highlight.js/lib/languages/csharp, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:6— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:6 imports highlight.js/lib/languages/css, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:7— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:7 imports highlight.js/lib/languages/diff, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:8— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:8 imports highlight.js/lib/languages/go, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:9— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:9 imports highlight.js/lib/languages/java, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:10— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:10 imports highlight.js/lib/languages/javascript, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:11— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:11 imports highlight.js/lib/languages/json, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:12— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:12 imports highlight.js/lib/languages/kotlin, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:13— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:13 imports highlight.js/lib/languages/markdown, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:14— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:14 imports highlight.js/lib/languages/python, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:15— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:15 imports highlight.js/lib/languages/ruby, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:16— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:16 imports highlight.js/lib/languages/rust, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:17— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:17 imports highlight.js/lib/languages/sql, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:18— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:18 imports highlight.js/lib/languages/typescript, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:19— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:19 imports highlight.js/lib/languages/xml, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:20— crates/product/ironclaw_webui/frontend/src/lib/syntax-highlighting.ts:20 imports highlight.js/lib/languages/yaml, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
ironclaw_llm::reasoning::find_code_regions (cognitive 107) crates/domains/ironclaw_llm/src/reasoning.rs:53— ironclaw_llm::reasoning::find_code_regions has cognitive complexity 107 (threshold 15). Drivers by points: if/else 25 (64 pts), loops 11 (27 pts), boolean chains 16 (nesting depth added 55). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ironclaw_llm::rig_adapter::convert_messages (cognitive 86) crates/domains/ironclaw_llm/src/rig_adapter.rs:520— ironclaw_llm::rig_adapter::convert_messages has cognitive complexity 86 (threshold 15). Drivers by points: if/else 24 (69 pts), loops 3 (9 pts), match/switch 3 (8 pts) (nesting depth added 56). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_llm::openai_codex_provider::parse_sse_response (cognitive 80) crates/domains/ironclaw_llm/src/openai_codex_provider.rs:722— ironclaw_llm::openai_codex_provider::parse_sse_response has cognitive complexity 80 (threshold 15). Drivers by points: if/else 27 (70 pts), match/switch 3 (6 pts), boolean chains 2, loops 2 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_llm::agent_message::validate_agent_messages (cognitive 54) crates/domains/ironclaw_llm/src/agent_message.rs:243— ironclaw_llm::agent_message::validate_agent_messages has cognitive complexity 54 (threshold 15). Drivers by points: if/else 13 (38 pts), loops 3 (8 pts), match/switch 2 (7 pts), boolean chains 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_llm::tool_schema::normalize_schema_recursive (cognitive 41) crates/domains/ironclaw_llm/src/tool_schema.rs:277— ironclaw_llm::tool_schema::normalize_schema_recursive has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (24 pts), loops 5 (10 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_llm::anthropic_oauth::convert_messages (cognitive 41) crates/domains/ironclaw_llm/src/anthropic_oauth.rs:1243— ironclaw_llm::anthropic_oauth::convert_messages has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (23 pts), match/switch 4 (12 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_llm::bedrock::convert_messages (cognitive 36) crates/domains/ironclaw_llm/src/bedrock.rs:443— ironclaw_llm::bedrock::convert_messages has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 3 (8 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_llm::agent_message::chat_messages_from_agent_messages (cognitive 34) crates/domains/ironclaw_llm/src/agent_message.rs:454— ironclaw_llm::agent_message::chat_messages_from_agent_messages has cognitive complexity 34 (threshold 15). Drivers by points: match/switch 6 (17 pts), if/else 5 (13 pts), loops 3 (4 pts) (nesting depth added 20). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ironclaw_llm::anthropic_oauth::ingest_anthropic_event (cognitive 25) crates/domains/ironclaw_llm/src/anthropic_oauth.rs:966— ironclaw_llm::anthropic_oauth::ingest_anthropic_event has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 3 (5 pts), boolean chains 2 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ironclaw_llm::recording::parameterize_value (cognitive 24) crates/domains/ironclaw_llm/src/recording.rs:836— ironclaw_llm::recording::parameterize_value has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 5 (11 pts), match/switch 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ironclaw_llm::gemini_oauth::parse_custom_headers (cognitive 21) crates/domains/ironclaw_llm/src/gemini_oauth.rs:85— ironclaw_llm::gemini_oauth::parse_custom_headers has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ironclaw_llm::apply_decorator_chain_with_fallback (cognitive 20) crates/domains/ironclaw_llm/src/lib.rs:1051— ironclaw_llm::apply_decorator_chain_with_fallback has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (18 pts), match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ironclaw_llm::tool_schema::merge_top_level_variant_properties (cognitive 20) crates/domains/ironclaw_llm/src/tool_schema.rs:124— ironclaw_llm::tool_schema::merge_top_level_variant_properties has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_llm::nearai_chat::fetch_pricing (cognitive 20) crates/domains/ironclaw_llm/src/nearai_chat.rs:1436— ironclaw_llm::nearai_chat::fetch_pricing has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_llm::rig_adapter::extract_response (cognitive 19) crates/domains/ironclaw_llm/src/rig_adapter.rs:883— ironclaw_llm::rig_adapter::extract_response has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_llm::reasoning::strip_markdown_fence_block (cognitive 18) crates/domains/ironclaw_llm/src/reasoning.rs:481— ironclaw_llm::reasoning::strip_markdown_fence_block has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_llm::github_copilot::convert_messages (cognitive 17) crates/domains/ironclaw_llm/src/github_copilot.rs:575— ironclaw_llm::github_copilot::convert_messages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 2 (5 pts), loops 1 (3 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ironclaw_llm::agent_message::agent_messages_from_chat_messages (cognitive 17) crates/domains/ironclaw_llm/src/agent_message.rs:579— ironclaw_llm::agent_message::agent_messages_from_chat_messages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×18
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/app/ironclaw_cli/src/commands/traces/mod.rs:2025— crates/app/ironclaw_cli/src/commands/traces/mod.rs:2025-2047 | crates/domains/ironclaw_trace_commons/src/contribution/maintenance.rs:25-144 | crates/domains/ironclaw_trace_commons/src/contribution/queue.rs:1000-1023 | crates/domains/ironclaw_trace_commons/src/contribution/queue.rs:1027-1063 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/app/ironclaw_composition/src/deployment.rs:298— crates/app/ironclaw_composition/src/deployment.rs:298-325 | crates/app/ironclaw_composition/src/deployment.rs:328-363 | crates/app/ironclaw_composition/src/deployment.rs:387-422 | crates/app/ironclaw_composition/src/deployment.rs:481-511 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/domains/ironclaw_llm/src/nearai_chat.rs:886— crates/domains/ironclaw_llm/src/nearai_chat.rs:886-963 | crates/domains/ironclaw_llm/src/nearai_chat.rs:969-1022 | crates/domains/ironclaw_llm/src/nearai_chat.rs:1027-1141 | crates/domains/ironclaw_llm/src/nearai_chat.rs:1147-1220 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/domains/ironclaw_llm/src/rig_adapter.rs:1389— crates/domains/ironclaw_llm/src/rig_adapter.rs:1389-1459 | crates/domains/ironclaw_llm/src/rig_adapter.rs:1465-1535 | crates/domains/ironclaw_llm/src/rig_adapter.rs:1540-1640 | crates/domains/ironclaw_llm/src/rig_adapter.rs:1646-1742 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/domains/ironclaw_threads/src/filesystem_service.rs:3319— crates/domains/ironclaw_threads/src/filesystem_service.rs:3319-3355 | crates/domains/ironclaw_threads/src/filesystem_service.rs:3360-3385 | crates/domains/ironclaw_threads/src/filesystem_service.rs:3390-3425 | crates/domains/ironclaw_threads/src/filesystem_service.rs:3430-3447 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/domains/ironclaw_triggers/src/libsql.rs:479— crates/domains/ironclaw_triggers/src/libsql.rs:479-502 | crates/domains/ironclaw_triggers/src/libsql.rs:512-566 | crates/domains/ironclaw_triggers/src/libsql.rs:724-759 | crates/domains/ironclaw_triggers/src/libsql.rs:769-823 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/extensions/ironclaw_extension_manager/src/admin_configuration.rs:145— crates/extensions/ironclaw_extension_manager/src/admin_configuration.rs:145-155 | crates/product/ironclaw_assistant/src/reborn_services.rs:1546-1556 | crates/product/ironclaw_assistant/src/reborn_services.rs:6948-6958 | crates/product/ironclaw_assistant/src/suggestions.rs:408-421 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/extensions/packages/google-docs/wasm-src/src/api.rs:89— crates/extensions/packages/google-docs/wasm-src/src/api.rs:89-125 | crates/extensions/packages/google-drive/wasm-src/src/api.rs:69-97 | crates/extensions/packages/google-sheets/wasm-src/src/api.rs:62-102 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:62-102 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/extensions/packages/google-docs/wasm-src/src/api.rs:127— crates/extensions/packages/google-docs/wasm-src/src/api.rs:127-143 | crates/extensions/packages/google-drive/wasm-src/src/api.rs:116-132 | crates/extensions/packages/google-sheets/wasm-src/src/api.rs:104-120 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:104-120 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/extensions/packages/google-docs/wasm-src/src/lib.rs:108— crates/extensions/packages/google-docs/wasm-src/src/lib.rs:108-276 | crates/extensions/packages/google-sheets/wasm-src/src/lib.rs:96-227 | crates/extensions/packages/google-slides/wasm-src/src/lib.rs:108-295 | crates/extensions/packages/slack/wasm-src/src/lib.rs:101-230 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/kernel/ironclaw_host_runtime/src/latency.rs:154— crates/kernel/ironclaw_host_runtime/src/latency.rs:154-185 | crates/kernel/ironclaw_host_runtime/src/latency.rs:194-226 | crates/kernel/ironclaw_host_runtime/src/services/process_executor.rs:67-87 | crates/kernel/ironclaw_host_runtime/src/services/process_executor.rs:94-115 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/loop/ironclaw_loop_host/src/model_gateway.rs:431— crates/loop/ironclaw_loop_host/src/model_gateway.rs:431-483 | crates/loop/ironclaw_loop_host/src/model_gateway.rs:489-541 | crates/loop/ironclaw_loop_host/src/model_gateway.rs:547-603 | crates/loop/ironclaw_loop_host/src/model_gateway.rs:610-666 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/loop/ironclaw_loop_host/src/model_gateway.rs:806— crates/loop/ironclaw_loop_host/src/model_gateway.rs:806-851 | crates/loop/ironclaw_loop_host/src/model_gateway.rs:857-902 | crates/loop/ironclaw_loop_host/src/model_gateway.rs:908-957 | crates/loop/ironclaw_loop_host/src/model_gateway.rs:964-1013 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/loop/ironclaw_turn_runner/src/planned_driver_factory.rs:162— crates/loop/ironclaw_turn_runner/src/planned_driver_factory.rs:162-176 | crates/loop/ironclaw_turn_runner/src/planned_driver_factory.rs:180-194 | crates/loop/ironclaw_turn_runner/src/planned_driver_factory.rs:198-212 | crates/loop/ironclaw_turn_runner/src/planned_driver_factory.rs:216-230 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:1222— REDACTED:1222-1239 | REDACTED:1246-1313 | REDACTED:883-901 | REDACTED:908-962 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) tools/ironclaw_stress/src/child_io.rs:40— tools/ironclaw_stress/src/child_io.rs:40-48 | tools/ironclaw_stress/src/main.rs:2608-2616 | tools/ironclaw_stress/src/progress.rs:141-149 | tools/ironclaw_stress/src/trace.rs:290-298 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) scripts/reborn_webui_v2_live_qa/google_api_helpers.py:73— scripts/reborn_webui_v2_live_qa/google_api_helpers.py:73-113 | scripts/reborn_webui_v2_live_qa/google_api_helpers.py:199-236 | scripts/reborn_webui_v2_live_qa/google_api_helpers.py:308-328 | scripts/reborn_webui_v2_live_qa/google_api_helpers.py:336-364 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:432— crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:432-470 | crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:478-539 | crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:558-607 | crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:818-845 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
TooManyMethods: RebornServices crates/product/ironclaw_assistant/src/reborn_services.rs:2502— TooManyMethods — 181 methods, declared across 12 files: src/reborn_services.rs (143), reborn_services/llm_config.rs (8), reborn_services/product_commands.rs (8), src/suggestions.rs (4), +8 more file(s). The bar is 30 methods; this is 151 over it, 6.03× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: HostRuntimeServices crates/kernel/ironclaw_host_runtime/src/services.rs:130— TooManyMethods — 86 methods, declared across 3 files: services/builder.rs (58), src/services.rs (20), services/production_services.rs (8). The bar is 30 methods; this is 56 over it, 2.87× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: FilesystemSessionThreadService crates/domains/ironclaw_threads/src/filesystem_service.rs:229— TooManyMethods — 72 methods, declared across 5 files: src/filesystem_service.rs (42), filesystem_service/thread_index.rs (25), filesystem_service/transcript_migration.rs (3), filesystem_service/message_read.rs (1), +1 more file(s). The bar is 30 methods; this is 42 over it, 2.40× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RebornRuntime crates/app/ironclaw_composition/src/runtime.rs:601— TooManyMethods — 66 methods, declared across 2 files: src/runtime.rs (62), runtime/test_support.rs (4). The bar is 30 methods; this is 36 over it, 2.20× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ExtensionInstallationStore crates/extensions/ironclaw_extension_registry/src/installations.rs:1291— TooManyMethods — 65 methods. The bar is 30 methods; this is 35 over it, 2.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ExtensionLifecycleManager crates/extensions/ironclaw_extension_host/src/product_lifecycle.rs:137— TooManyMethods — 64 methods. The bar is 30 methods; this is 34 over it, 2.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: HookDispatcher crates/loop/ironclaw_hooks/src/dispatch/mod.rs:234— TooManyMethods — 64 methods. The bar is 30 methods; this is 34 over it, 2.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RebornProductAuthServices crates/domains/ironclaw_auth/src/product_auth/api/auth.rs:589— TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RebornHostBindings crates/app/ironclaw_composition/src/input.rs:168— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: FilesystemAuthProductServices crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:84— TooManyMethods — 38 methods, declared across 4 files: durable/mod.rs (26), durable/flows.rs (7), durable/interactions.rs (4), durable/accounts.rs (1). The bar is 30 methods; this is 8 over it, 1.27× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: HostRuntimeLoopCapabilityPort crates/loop/ironclaw_loop_host/src/capability_port.rs:1111— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RebornLoopDriverHostFactory crates/loop/ironclaw_turn_runner/src/loop_driver_host.rs:1031— TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ScopedFilesystem crates/substrates/ironclaw_filesystem/src/scoped.rs:47— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SelectableSkillContextSource crates/loop/ironclaw_loop_host/src/skill_activation/activation.rs:360— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SnapshotDeviceLinkDriver crates/extensions/ironclaw_extension_host/src/device_link_driver.rs:212— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ProcessJournalMaterializedState crates/kernel/ironclaw_processes/src/journal_store/state.rs:53— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: OpenAiResponsesWorkflow crates/product/ironclaw_openai_compat/src/responses_workflow.rs:70— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (17 lines × 2) crates/app/ironclaw_cli/src/commands/traces/mod.rs:706— crates/app/ironclaw_cli/src/commands/traces/mod.rs:706-722 | crates/app/ironclaw_cli/src/commands/traces/mod.rs:869-894 — 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.
Duplicated block (17 lines × 2) crates/app/ironclaw_cli/src/first_party/gsuite.rs:49— crates/app/ironclaw_cli/src/first_party/gsuite.rs:49-65 | crates/extensions/ironclaw_extension_host/src/test_support/first_party_registrars.rs:69-85 — before extracting anything, compare `crates/app/ironclaw_cli/src/first_party/gsuite.rs` and `crates/extensions/ironclaw_extension_host/src/test_support/first_party_registrars.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) crates/app/ironclaw_composition/src/factory/production_build_assembly.rs:114— crates/app/ironclaw_composition/src/factory/production_build_assembly.rs:114-130 | crates/app/ironclaw_composition/src/factory/production_build_assembly.rs:149-165 — 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.
Duplicated block (17 lines × 2) crates/contracts/ironclaw_extension_contracts/src/auth_prompt.rs:644— crates/contracts/ironclaw_extension_contracts/src/auth_prompt.rs:644-660 | crates/contracts/ironclaw_product_contracts/src/outbound.rs:65-81 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (17 lines × 2) crates/domains/ironclaw_auth/src/fakes.rs:364— crates/domains/ironclaw_auth/src/fakes.rs:364-380 | crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:335-351 — before extracting anything, compare `crates/domains/ironclaw_auth/src/fakes.rs` and `crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) crates/domains/ironclaw_outbound/src/outbound_state_store.rs:372— crates/domains/ironclaw_outbound/src/outbound_state_store.rs:372-388 | crates/domains/ironclaw_outbound/src/outbound_state_store.rs:1528-1544 — 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.
Duplicated block (17 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service.rs:3320— crates/domains/ironclaw_threads/src/filesystem_service.rs:3320-3336 | crates/domains/ironclaw_threads/src/filesystem_service.rs:3391-3407 — 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.
Duplicated block (17 lines × 2) crates/extensions/ironclaw_extension_host/src/channel_identity_store.rs:267— crates/extensions/ironclaw_extension_host/src/channel_identity_store.rs:267-283 | crates/extensions/ironclaw_extension_host/src/channel_identity_store.rs:624-640 — 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.
Duplicated block (17 lines × 2) crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:201— crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:201-217 | crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:355-371 — 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.
Duplicated block (17 lines × 2) crates/product/ironclaw_assistant/src/reborn_services/lifecycle_setup.rs:133— crates/product/ironclaw_assistant/src/reborn_services/lifecycle_setup.rs:133-149 | crates/product/ironclaw_assistant/src/reborn_services/lifecycle_setup.rs:178-194 — 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.
Duplicated block (17 lines × 2) crates/product/ironclaw_operator/src/operator_logs.rs:415— crates/product/ironclaw_operator/src/operator_logs.rs:415-431 | crates/product/ironclaw_operator/src/operator_logs.rs:440-456 — 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.
Duplicated block (17 lines × 2) REDACTED:1037— REDACTED:1037-1053 | REDACTED:1082-1098 — 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.
Duplicated block (17 lines × 2) crates/app/ironclaw_composition/src/capability_authorization.rs:378— crates/app/ironclaw_composition/src/capability_authorization.rs:378-394 | crates/app/ironclaw_composition/src/capability_authorization.rs:511-527 — 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.
Duplicated block (17 lines × 2) crates/events/ironclaw_event_projections/src/lib.rs:796— crates/events/ironclaw_event_projections/src/lib.rs:796-812 | crates/events/ironclaw_event_projections/src/lib.rs:873-889 — 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.
Duplicated block (17 lines × 2) crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:311— crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:311-327 | crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:403-419 — 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.
Duplicated block (17 lines × 2) scripts/reborn_webui_v2_live_qa/run_live_qa.py:8524— scripts/reborn_webui_v2_live_qa/run_live_qa.py:8524-8540 | scripts/reborn_webui_v2_live_qa/run_live_qa.py:8641-8657 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/reborn_webui_v2_live_qa/run_live_qa.py:8524` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Off the main sequence: ironclaw_common — ironclaw_common: abstractness 0.00, instability 0.00, distance 1.00 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: ironclaw_config — ironclaw_config: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: ironclaw_documents — ironclaw_documents: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: ironclaw_libsql_runtime — ironclaw_libsql_runtime: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: ironclaw_prompt_envelope — ironclaw_prompt_envelope: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: ironclaw_wasm_limiter — ironclaw_wasm_limiter: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: ironclaw_host_api — ironclaw_host_api: abstractness 0.07, instability 0.00, distance 0.93 — zone of pain — concrete and depended on by 57 project(s), so it's rigid to change.
Off the main sequence: ironclaw_safety — ironclaw_safety: abstractness 0.09, instability 0.00, distance 0.91 — zone of pain — concrete and depended on by 18 project(s), so it's rigid to change.
Off the main sequence: ironclaw_filesystem — ironclaw_filesystem: abstractness 0.04, instability 0.11, distance 0.85 — zone of pain — concrete and depended on by 31 project(s), so it's rigid to change.
Off the main sequence: ironclaw_extension_contracts — ironclaw_extension_contracts: abstractness 0.11, instability 0.05, distance 0.84 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: ironclaw_runtime_policy — ironclaw_runtime_policy: abstractness 0.00, instability 0.20, distance 0.80 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: ironclaw_memory — ironclaw_memory: abstractness 0.10, instability 0.13, distance 0.78 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
Off the main sequence: ironclaw_product_contracts — ironclaw_product_contracts: abstractness 0.09, instability 0.14, distance 0.77 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: ironclaw_secrets — ironclaw_secrets: abstractness 0.08, instability 0.18, distance 0.73 — zone of pain — concrete and depended on by 9 project(s), so it's rigid to change.
Off the main sequence: ironclaw_trust — ironclaw_trust: abstractness 0.17, instability 0.11, distance 0.72 — zone of pain — concrete and depended on by 8 project(s), so it's rigid to change.
Off the main sequence: ironclaw_loop_contracts — ironclaw_loop_contracts: abstractness 0.14, instability 0.15, distance 0.71 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
ironclaw_stress::validate_args (cognitive 120) tools/ironclaw_stress/src/main.rs:1124— ironclaw_stress::validate_args has cognitive complexity 120 (threshold 15). Drivers by points: if/else 82 (96 pts), boolean chains 22, loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ironclaw_stress::apply_preset (cognitive 92) tools/ironclaw_stress/src/main.rs:987— ironclaw_stress::apply_preset has cognitive complexity 92 (threshold 15). Drivers by points: if/else 81 (91 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ironclaw_stress::sweep::build_cases (cognitive 86) tools/ironclaw_stress/src/sweep.rs:317— ironclaw_stress::sweep::build_cases has cognitive complexity 86 (threshold 15). Drivers by points: loops 11 (66 pts), if/else 20 (nesting depth added 55). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ironclaw_stress::api_capacity::run_scripted_full_flow (cognitive 30) tools/ironclaw_stress/src/api_capacity.rs:1277— ironclaw_stress::api_capacity::run_scripted_full_flow has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 4 (9 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ironclaw_stress::api_capacity::setup_users (cognitive 26) tools/ironclaw_stress/src/api_capacity.rs:1872— ironclaw_stress::api_capacity::setup_users has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (6 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_stress::scripted::respond_for_session (cognitive 22) tools/ironclaw_stress/src/scripted.rs:1227— ironclaw_stress::scripted::respond_for_session has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_stress::api_capacity::run_window (cognitive 21) tools/ironclaw_stress/src/api_capacity.rs:709— ironclaw_stress::api_capacity::run_window has cognitive complexity 21 (threshold 15). Drivers by points: loops 8 (10 pts), if/else 5 (7 pts), boolean chains 4 (nesting depth added 4). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ironclaw_stress::run_child_processes (cognitive 20) tools/ironclaw_stress/src/main.rs:1573— ironclaw_stress::run_child_processes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 4 (8 pts), loops 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ironclaw_stress::api_capacity::provision_missing_identities (cognitive 20) tools/ironclaw_stress/src/api_capacity.rs:1984— ironclaw_stress::api_capacity::provision_missing_identities has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_stress::scripted::record_step_result (cognitive 20) tools/ironclaw_stress/src/scripted.rs:1169— ironclaw_stress::scripted::record_step_result has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (14 pts), match/switch 2 (6 pts) (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ironclaw_stress::run_user_turn_in_process (cognitive 19) tools/ironclaw_stress/src/main.rs:2023— ironclaw_stress::run_user_turn_in_process has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ironclaw_stress::api_capacity::handle_mock_completion (cognitive 19) tools/ironclaw_stress/src/api_capacity.rs:2625— ironclaw_stress::api_capacity::handle_mock_completion has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_stress::sweep::enforce_thresholds (cognitive 17) tools/ironclaw_stress/src/sweep.rs:259— ironclaw_stress::sweep::enforce_thresholds has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_stress::api_capacity::summarize_scripted (cognitive 16) tools/ironclaw_stress/src/api_capacity.rs:609— ironclaw_stress::api_capacity::summarize_scripted has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (4 pts), match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_stress::scripted::classify_checkpoint (cognitive 16) tools/ironclaw_stress/src/scripted.rs:1420— ironclaw_stress::scripted::classify_checkpoint has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Change coupling: canonical.rs ↔ REDACTED crates/loop/ironclaw_agent_loop/src/executor/canonical.rs— `crates/loop/ironclaw_agent_loop/src/executor/canonical.rs` and `crates/loop/ironclaw_agent_loop/src/executor/tests.rs` change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `bd243b35` fix(loop): make repeated-call detection advisory-only (#7531); `202b9725` fix(automations): reject unusable scheduled output (#7530); `15f06e1b` feat(agent-loop): tools-capable completion nudge for interactive codi… (at that commit the files were still `crates/ironclaw_agent_loop/src/executor/canonical.rs` and `crates/ironclaw_agent_loop/src/executor/tests.rs`) — run `git show` on any of them.
Change coupling: reborn_services.rs ↔ router.rs crates/product/ironclaw_assistant/src/reborn_services.rs— `crates/product/ironclaw_assistant/src/reborn_services.rs` and `crates/product/ironclaw_webui/src/webui_v2/router.rs` change together 75% of the time (9 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `9da74f18` feat(llm): add tenant-scoped model selection policy (#7428); `a2a8040d` feat(inspector): add operator inspection API and live updates (#7235); `80844141` feat(reborn): export caller-scoped QA run artifacts (#6344) (at that commit the files were still `crates/ironclaw_product_workflow/src/reborn_services.rs` and `crates/ironclaw_webui/src/webui_v2/router.rs`) — run `git show` on any of them.
Change coupling: reborn_services.rs ↔ mod.rs crates/product/ironclaw_assistant/src/reborn_services.rs— `crates/product/ironclaw_assistant/src/reborn_services.rs` and `crates/product/ironclaw_webui/src/webui_v2/mod.rs` change together 75% of the time (9 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `9da74f18` feat(llm): add tenant-scoped model selection policy (#7428); `a2a8040d` feat(inspector): add operator inspection API and live updates (#7235); `80844141` feat(reborn): export caller-scoped QA run artifacts (#6344) (at that commit the files were still `crates/ironclaw_product_workflow/src/reborn_services.rs` and `crates/ironclaw_webui/src/webui_v2/mod.rs`) — run `git show` on any of them.
Change coupling: runtime.rs ↔ run_delivery.rs crates/app/ironclaw_composition/src/runtime.rs— `crates/app/ironclaw_composition/src/runtime.rs` and `crates/product/ironclaw_assistant/src/run_delivery.rs` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `94b7187e` feat(notifications): publish automation pre-run failures (#7899); `ec4c62df` fix(notifications): persist auth gates before enrichment (#7901); `0fb92368` feat(notifications): publish durable resource blocks (#7900) — run `git show` on any of them.
Change coupling: schemas.rs ↔ trigger_management.rs crates/kernel/ironclaw_host_runtime/src/first_party_tools/schemas.rs— `crates/kernel/ironclaw_host_runtime/src/first_party_tools/schemas.rs` and `crates/kernel/ironclaw_host_runtime/src/first_party_tools/trigger_management.rs` change together 69% of the time (9 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `ca531e94` feat(automations): expose exact run capability facts (#7850); `1c30566c` fix(automations): stop authoring after persisted create (#7847); `2d643631` fix(qa): stop the agent asserting unverified state — automation statu… — run `git show` on any of them.
Change coupling: http.rs ↔ lib.rs crates/contracts/ironclaw_host_api/src/http.rs— `crates/contracts/ironclaw_host_api/src/http.rs` and `crates/kernel/ironclaw_host_runtime/src/lib.rs` change together 59% of the time (10 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `04f56a60` [codex] Close Reborn production credential boundary gaps (#3903) (at that commit the files were still `crates/ironclaw_host_api/src/http.rs` and `crates/ironclaw_host_runtime/src/lib.rs`); `fb9f0623` Fix Reborn HTTP save_to authority (#4105) (at that commit the files were still `crates/ironclaw_host_api/src/http.rs` and `crates/ironclaw_host_runtime/src/lib.rs`); `aa324939` [codex] Add Reborn HTTP response body saving (#4071) (at that commit the files were still `crates/ironclaw_host_api/src/http.rs` and `crates/ironclaw_host_runtime/src/lib.rs`) — run `git show` on any of them.
Change coupling: prompt.rs ↔ lib.rs crates/kernel/ironclaw_turns/src/host_managed_ports/prompt.rs— `crates/kernel/ironclaw_turns/src/host_managed_ports/prompt.rs` and `crates/loop/ironclaw_loop_host/src/lib.rs` change together 56% of the time (9 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `c1491c30` fix(loop): retain accepted task across context eviction (#7503); `ca4b4092` feat(reborn): per-user agent-context profile (timezone/locale/locatio… (at that commit the files were still `crates/ironclaw_turns/src/run_profile/prompt.rs` and `crates/ironclaw_loop_support/src/lib.rs`); `dbfe0518` [codex] Add budgeted compaction context scanning (#4541) (at that commit the files were still `crates/ironclaw_turns/src/run_profile/prompt.rs` and `crates/ironclaw_loop_support/src/lib.rs`) — run `git show` on any of them.
Change coupling: REDACTED ↔ REDACTED REDACTED— `REDACTED` and `REDACTED` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `dc2581a4` fix(memory): ranked recall retrieval + a visible difference between b…; `ff8079bf` Optimize RootFilesystem latency substrate (#5724) (at that commit the files were still `crates/ironclaw_filesystem/src/libsql.rs` and `crates/ironclaw_filesystem/src/postgres.rs`); `14e025d7` fix(filesystem): address PR #3661 indexer review feedback (at that commit the files were still `crates/ironclaw_filesystem/src/libsql.rs` and `crates/ironclaw_filesystem/src/postgres.rs`) — run `git show` on any of them.
Change coupling: factory.rs ↔ lib.rs crates/app/ironclaw_composition/src/factory.rs— `crates/app/ironclaw_composition/src/factory.rs` and `crates/extensions/ironclaw_extension_support/src/lib.rs` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `362c87ab` Wire Reborn auth consumers through staged credentials (#4231) (at that commit the files were still `crates/ironclaw_reborn_composition/src/factory.rs` and `crates/ironclaw_first_party_extensions/src/lib.rs`); `f64324d3` feat(reborn): add web access extension (#4219) (at that commit the files were still `crates/ironclaw_reborn_composition/src/factory.rs` and `crates/ironclaw_first_party_extensions/src/lib.rs`); `cb211f94` [codex] Add GSuite OAuth backend (#4111) (at that commit the files were still `crates/ironclaw_reborn_composition/src/factory.rs` and `crates/ironclaw_first_party_extensions/src/lib.rs`) — run `git show` on any of them.
Change coupling: runtime.rs ↔ lib.rs crates/app/ironclaw_composition/src/runtime.rs— `crates/app/ironclaw_composition/src/runtime.rs` and `crates/extensions/ironclaw_extension_support/src/lib.rs` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `d7db675c` Add Reborn setup marker skill parity (#3950) (at that commit the files were still `crates/ironclaw_reborn_composition/src/runtime.rs` and `crates/ironclaw_first_party_extensions/src/lib.rs`); `bf5a9b3b` [codex] Add Reborn skill management tools (#3935) (at that commit the files were still `crates/ironclaw_reborn_composition/src/runtime.rs` and `crates/ironclaw_first_party_extensions/src/lib.rs`); `86eafa3d` [codex] Add Reborn skill asset access and execution adapter (#3863) (at that commit the files were still `crates/ironclaw_reborn_composition/src/runtime.rs` and `crates/ironclaw_first_party_extensions/src/lib.rs`) — run `git show` on any of them.
Change coupling: lib.rs ↔ mod.rs crates/product/ironclaw_assistant/src/lib.rs— `crates/product/ironclaw_assistant/src/lib.rs` and `crates/product/ironclaw_webui/src/webui_v2/mod.rs` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `80844141` feat(reborn): export caller-scoped QA run artifacts (#6344) (at that commit the files were still `crates/ironclaw_product_workflow/src/lib.rs` and `crates/ironclaw_webui/src/webui_v2/mod.rs`); `7842547e` [codex] Add Reborn effective config key route contract (#4601) (at that commit the files were still `crates/ironclaw_product_workflow/src/lib.rs` and `crates/ironclaw_webui_v2/src/lib.rs`); `c203a83a` [codex] Add Reborn operator command-plane route shells (#4599) (at that commit the files were still `crates/ironclaw_product_workflow/src/lib.rs` and `crates/ironclaw_webui_v2/src/lib.rs`) — run `git show` on any of them.
Change coupling: product_live_adapters.rs ↔ capability_host.rs crates/app/ironclaw_composition/src/root/product_live_adapters.rs— `crates/app/ironclaw_composition/src/root/product_live_adapters.rs` and `crates/app/ironclaw_composition/src/runtime/capability_host.rs` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `47772e45` feat(reborn): show tool arguments live while the tool is running (#5035) (at that commit the files were still `crates/ironclaw_reborn_composition/src/product_live_adapters.rs` and `crates/ironclaw_reborn_composition/src/runtime/local_dev.rs`); `8ab4ac42` fix(reborn): show tool arguments in conversation Activity view (#5012) (at that commit the files were still `crates/ironclaw_reborn_composition/src/product_live_adapters.rs` and `crates/ironclaw_reborn_composition/src/runtime/local_dev.rs`); `8aee9f75` Fix subagent safety and capability gating (#4373) (at that commit the files were still `crates/ironclaw_reborn_composition/src/product_live_adapters.rs` and `crates/ironclaw_reborn_composition/src/runtime/local_dev.rs`) — run `git show` on any of them.
Change coupling: REDACTED ↔ REDACTED crates/domains/ironclaw_triggers/src/libsql.rs— `crates/domains/ironclaw_triggers/src/libsql.rs` and `crates/domains/ironclaw_triggers/src/worker/tests.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `26a5f902` fix(reborn): deliver triggered Slack runs after settlement (#5318) (at that commit the files were still `crates/ironclaw_triggers/src/libsql.rs` and `crates/ironclaw_triggers/src/worker/tests.rs`); `d2b91964` fix(triggers): surface trigger input errors (#5140) (at that commit the files were still `crates/ironclaw_triggers/src/libsql.rs` and `crates/ironclaw_triggers/src/worker/tests.rs`); `0387b563` fix(webui): open, watch, and approve triggered automation runs from t… (at that commit the files were still `crates/ironclaw_triggers/src/libsql.rs` and `crates/ironclaw_triggers/src/worker/tests.rs`) — run `git show` on any of them.
Change coupling: REDACTED ↔ REDACTED crates/domains/ironclaw_triggers/src/postgres.rs— `crates/domains/ironclaw_triggers/src/postgres.rs` and `crates/domains/ironclaw_triggers/src/worker/tests.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `26a5f902` fix(reborn): deliver triggered Slack runs after settlement (#5318) (at that commit the files were still `crates/ironclaw_triggers/src/postgres.rs` and `crates/ironclaw_triggers/src/worker/tests.rs`); `d2b91964` fix(triggers): surface trigger input errors (#5140) (at that commit the files were still `crates/ironclaw_triggers/src/postgres.rs` and `crates/ironclaw_triggers/src/worker/tests.rs`); `0387b563` fix(webui): open, watch, and approve triggered automation runs from t… (at that commit the files were still `crates/ironclaw_triggers/src/postgres.rs` and `crates/ironclaw_triggers/src/worker/tests.rs`) — run `git show` on any of them.
Change coupling: lib.rs ↔ text_loop_driver.rs crates/loop/ironclaw_loop_host/src/lib.rs— `crates/loop/ironclaw_loop_host/src/lib.rs` and `crates/loop/ironclaw_turn_runner/src/text_loop_driver.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `81724a68` feat(inspector): add model call statistics (#7277); `9f466f32` Surface NEAR AI credit exhaustion in reborn (#4286) (at that commit the files were still `crates/ironclaw_loop_support/src/lib.rs` and `crates/ironclaw_reborn/src/text_loop_driver.rs`); `689cd790` Reborn cost-based budgets: foundation (resources, accountant, gate, p… (at that commit the files were still `crates/ironclaw_loop_support/src/lib.rs` and `crates/ironclaw_reborn/src/text_loop_driver.rs`) — run `git show` on any of them.
ironclaw_extension_support::skills::url_install::zip_bundle::extract_skill_bundle (cognitive 41) crates/extensions/ironclaw_extension_support/src/skills/url_install/zip_bundle.rs:26— ironclaw_extension_support::skills::url_install::zip_bundle::extract_skill_bundle has cognitive complexity 41 (threshold 15). Drivers by points: if/else 19 (35 pts), loops 3, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extension_support::coding::grep_tool::walk_files (cognitive 36) crates/extensions/ironclaw_extension_support/src/coding/grep_tool.rs:223— ironclaw_extension_support::coding::grep_tool::walk_files has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extension_support::coding::file::collect_list_entries (cognitive 29) crates/extensions/ironclaw_extension_support/src/coding/file.rs:664— ironclaw_extension_support::coding::file::collect_list_entries has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extension_support::gsuite::handlers::calendar_list_events::resolve_calendar_ids (cognitive 26) crates/extensions/ironclaw_extension_support/src/gsuite/handlers/calendar_list_events.rs:294— ironclaw_extension_support::gsuite::handlers::calendar_list_events::resolve_calendar_ids has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extension_support::coding::diff_preview::file_diff_preview (cognitive 25) crates/extensions/ironclaw_extension_support/src/coding/diff_preview.rs:17— ironclaw_extension_support::coding::diff_preview::file_diff_preview has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (6 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extension_support::coding::text::replace_content (cognitive 24) crates/extensions/ironclaw_extension_support/src/coding/text.rs:312— ironclaw_extension_support::coding::text::replace_content has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extension_support::coding::grep_tool::grep (cognitive 23) crates/extensions/ironclaw_extension_support/src/coding/grep_tool.rs:36— ironclaw_extension_support::coding::grep_tool::grep has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, boolean chains 4, match/switch 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ironclaw_extension_support::gsuite::handlers::gmail_message::select_body (cognitive 22) crates/extensions/ironclaw_extension_support/src/gsuite/handlers/gmail_message.rs:195— ironclaw_extension_support::gsuite::handlers::gmail_message::select_body has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 6 (12 pts), if/else 5 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ironclaw_extension_support::coding::file::read_file (cognitive 22) crates/extensions/ironclaw_extension_support/src/coding/file.rs:40— ironclaw_extension_support::coding::file::read_file has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 4 (8 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ironclaw_extension_support::coding::file::read_file_text_output (cognitive 21) crates/extensions/ironclaw_extension_support/src/coding/file.rs:268— ironclaw_extension_support::coding::file::read_file_text_output has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extension_support::skills::url_install::github::fetch_github_contents_bundle_payload (cognitive 19) crates/extensions/ironclaw_extension_support/src/skills/url_install/github.rs:614— ironclaw_extension_support::skills::url_install::github::fetch_github_contents_bundle_payload has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extension_support::coding::text::normalize_with_source_map (cognitive 19) crates/extensions/ironclaw_extension_support/src/coding/text.rs:427— ironclaw_extension_support::coding::text::normalize_with_source_map has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 4 (8 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ironclaw_extension_support::skills::url_install::github::resolve_github_ref_from_segments (cognitive 16) crates/extensions/ironclaw_extension_support/src/skills/url_install/github.rs:431— ironclaw_extension_support::skills::url_install::github::resolve_github_ref_from_segments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extension_support::coding::grep_tool::build_grep_output (cognitive 16) crates/extensions/ironclaw_extension_support/src/coding/grep_tool.rs:394— ironclaw_extension_support::coding::grep_tool::build_grep_output has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 2 (5 pts), boolean chains 2, match/switch 2 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
R4 · Test Coverage· No test reaches this file · ×14
No test reaches this file crates/product/ironclaw_webui/frontend/src/pages/settings/components/channels-tab.tsx— 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.
No test reaches this file crates/product/ironclaw_webui/frontend/src/pages/settings/components/users-tab.tsx— 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.
No test reaches this file crates/product/ironclaw_webui/frontend/src/design-system/props.type-test.tsx— 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.
No test reaches this file crates/product/ironclaw_webui/frontend/src/pages/chat/components/thread-sidebar.tsx— 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.
No test reaches this file crates/product/ironclaw_webui/frontend/src/pages/projects/components/project-inspector-rail.tsx— 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.
No test reaches this file crates/product/ironclaw_webui/frontend/src/pages/projects/components/project-thread-inspector.tsx— 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.
No test reaches this file crates/product/ironclaw_webui/frontend/src/pages/projects/components/project-widgets.tsx— 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.
No test reaches this file crates/product/ironclaw_webui/frontend/src/wallet-connect.ts— 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.
No test reaches this file crates/product/ironclaw_webui/frontend/src/pages/settings/components/agent-tab.tsx— 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.
No test reaches this file crates/product/ironclaw_webui/frontend/src/pages/settings/components/networking-tab.tsx— 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.
No test reaches this file crates/product/ironclaw_webui/frontend/src/pages/projects/components/projects-attention-strip.tsx— 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.
No test reaches this file crates/product/ironclaw_webui/frontend/src/pages/settings/hooks/useUsers.ts— 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.
No test reaches this file crates/product/ironclaw_webui/frontend/src/pages/chat/components/code-block.tsx— 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.
No test reaches this file crates/product/ironclaw_webui/frontend/src/pages/projects/hooks/useProjectInspector.ts— 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.
TodoComment crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:634— // TODO(follow-up): add a LibSql-backed sweep test that drives the real — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:63— // TODO(#4175 follow-up): project completed product-auth accounts into
TodoComment crates/loop/ironclaw_loop_host/src/tool_disclosure.rs:810— /// TODO(next pass): if promoted tools are truncated by caps, start a deliberate — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/product/ironclaw_assistant/src/auth_interaction/types.rs:175— // TODO(design): `AwaitingVendor` is non-terminal but has no — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/product/ironclaw_assistant/src/auth_interaction/types.rs:232— // TODO(design): a device-link step has no redacted chat-surface — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/product/ironclaw_webui/frontend/src/app/routes.ts:6— // TODO stubs against missing v2 endpoints are hidden here until the — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/product/ironclaw_webui/frontend/src/lib/api.ts:1132— // --- TODO stubs for v1-shaped helpers brought-back code still imports --- — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/product/ironclaw_webui/frontend/src/lib/api.ts:1150— // TODO: requires v2 gateway-status endpoint. Returning a zeroed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/product/ironclaw_webui/frontend/src/pages/jobs/lib/jobs-api.ts:1— // All jobs endpoints depend on v1 `/api/jobs/*`. TODO stubs until — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/product/ironclaw_webui/frontend/src/pages/settings/hooks/useGatewayRestart.ts:4— // TODO: gateway restart is a v1 capability (POSTs `/restart` as a — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/substrates/ironclaw_secrets/src/secret_store.rs:41— //! TODO(reborn/fs-secrets): once `EncryptedBackend` ships, replace the inline — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/substrates/ironclaw_secrets/src/secret_store.rs:821— // TODO(perf): this is an N+1 scan — list_dir over the per-owner — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/integration/group_triggers/scenario_verbs_lifecycle.rs:26— // TODO(T0-TRIGGERS, no enabler needed): follow-ups this group can grow as new — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
ironclaw_assistant::run_delivery::triggered::notify_background_run (cognitive 107) crates/product/ironclaw_assistant/src/run_delivery/triggered.rs:507— ironclaw_assistant::run_delivery::triggered::notify_background_run has cognitive complexity 107 (threshold 15). Drivers by points: if/else 38 (80 pts), match/switch 5 (13 pts), boolean chains 10, loops 2 (4 pts) (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_assistant::delivery_coordinator::publication::worker::run_target (cognitive 97) crates/product/ironclaw_assistant/src/delivery_coordinator/publication/worker.rs:64— ironclaw_assistant::delivery_coordinator::publication::worker::run_target has cognitive complexity 97 (threshold 15). Drivers by points: if/else 23 (60 pts), match/switch 11 (31 pts), boolean chains 5, loops 1 (nesting depth added 57). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ironclaw_assistant::projection::display_preview::input_summary (cognitive 60) crates/product/ironclaw_assistant/src/projection/display_preview.rs:577— ironclaw_assistant::projection::display_preview::input_summary has cognitive complexity 60 (threshold 15). Drivers by points: if/else 43 (55 pts), boolean chains 5 (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ironclaw_assistant::delivery_coordinator::publication::kernel_ports::enrich_attention (cognitive 27) crates/product/ironclaw_assistant/src/delivery_coordinator/publication/kernel_ports.rs:128— ironclaw_assistant::delivery_coordinator::publication::kernel_ports::enrich_attention has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 6 (9 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_assistant::reborn_services::extension_credentials::presence_readiness_and_missing_scopes (cognitive 25) crates/product/ironclaw_assistant/src/reborn_services/extension_credentials.rs:87— ironclaw_assistant::reborn_services::extension_credentials::presence_readiness_and_missing_scopes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (6 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_assistant::projection::reply::fold_milestone (cognitive 25) crates/product/ironclaw_assistant/src/projection/reply.rs:514— ironclaw_assistant::projection::reply::fold_milestone has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 1, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_assistant::delivery_coordinator::materialize_workspace_files (cognitive 25) crates/product/ironclaw_assistant/src/delivery_coordinator.rs:1187— ironclaw_assistant::delivery_coordinator::materialize_workspace_files has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 3, boolean chains 2, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_assistant::reborn_services::open_product_surface_event_subscription (cognitive 22) crates/product/ironclaw_assistant/src/reborn_services.rs:5654— ironclaw_assistant::reborn_services::open_product_surface_event_subscription has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 6 (13 pts), if/else 4 (6 pts), loops 2, boolean chains 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ironclaw_assistant::delivery_coordinator::publication::worker::handle_step (cognitive 20) crates/product/ironclaw_assistant/src/delivery_coordinator/publication/worker.rs:465— ironclaw_assistant::delivery_coordinator::publication::worker::handle_step has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 3 (5 pts), boolean chains 4 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ironclaw_assistant::run_delivery::gate_routes::record_gate_route_if_needed (cognitive 18) crates/product/ironclaw_assistant/src/run_delivery/gate_routes.rs:21— ironclaw_assistant::run_delivery::gate_routes::record_gate_route_if_needed has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_assistant::projection::push_ordered_initial_runtime_items (cognitive 18) crates/product/ironclaw_assistant/src/projection.rs:789— ironclaw_assistant::projection::push_ordered_initial_runtime_items has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_assistant::inbound_turn::validate_and_normalize_inbound_attachments (cognitive 17) crates/product/ironclaw_assistant/src/inbound_turn.rs:984— ironclaw_assistant::inbound_turn::validate_and_normalize_inbound_attachments has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (18 lines × 2) crates/app/ironclaw_composition/src/llm_admin/openai_compat_serve.rs:389— crates/app/ironclaw_composition/src/llm_admin/openai_compat_serve.rs:389-406 | crates/app/ironclaw_composition/src/llm_admin/openai_compat_serve.rs:621-638 — 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.
Duplicated block (18 lines × 2) crates/contracts/ironclaw_loop_contracts/src/host/validate.rs:145— crates/contracts/ironclaw_loop_contracts/src/host/validate.rs:145-162 | crates/events/ironclaw_event_log/src/runtime_event.rs:1108-1125 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (18 lines × 2) crates/extensions/ironclaw_extension_manager/src/extension_lifecycle_capabilities.rs:623— crates/extensions/ironclaw_extension_manager/src/extension_lifecycle_capabilities.rs:623-640 | crates/extensions/ironclaw_extension_manager/src/lifecycle_product_service.rs:468-485 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (18 lines × 2) crates/extensions/ironclaw_extension_manager/src/extension_lifecycle_capabilities.rs:669— crates/extensions/ironclaw_extension_manager/src/extension_lifecycle_capabilities.rs:669-686 | crates/extensions/ironclaw_extension_manager/src/lifecycle_product_service.rs:519-536 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (18 lines × 2) crates/extensions/packages/google-docs/wasm-src/src/api.rs:976— crates/extensions/packages/google-docs/wasm-src/src/api.rs:976-993 | crates/extensions/packages/google-docs/wasm-src/src/api.rs:1045-1062 — 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.
Duplicated block (18 lines × 2) crates/extensions/packages/memory-native/src/repo/filesystem.rs:655— crates/extensions/packages/memory-native/src/repo/filesystem.rs:655-672 | crates/extensions/packages/memory-native/src/repo/filesystem.rs:742-759 — 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.
Duplicated block (18 lines × 2) crates/kernel/ironclaw_host_runtime/src/invocation_services.rs:480— crates/kernel/ironclaw_host_runtime/src/invocation_services.rs:480-497 | crates/substrates/ironclaw_filesystem/src/scoped.rs:857-874 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (18 lines × 2) crates/product/ironclaw_assistant/src/automation_product_service.rs:327— crates/product/ironclaw_assistant/src/automation_product_service.rs:327-344 | crates/product/ironclaw_assistant/src/automation_product_service.rs:422-439 — 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.
Duplicated block (18 lines × 2) REDACTED:754— REDACTED:754-771 | REDACTED:495-512 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 318 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 2) crates/domains/ironclaw_llm/src/transcription/chat_completions.rs:30— crates/domains/ironclaw_llm/src/transcription/chat_completions.rs:30-47 | crates/domains/ironclaw_llm/src/transcription/openai.rs:22-39 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (18 lines × 2) scripts/slack_smoke/run_smoke.py:293— scripts/slack_smoke/run_smoke.py:293-310 | scripts/telegram_smoke/run_smoke.py:256-273 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (18 lines × 2) crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:506— crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:506-523 | crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:574-591 — 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.
Duplicated block (8 lines × 3) crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:760— crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:760-767 | crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:784-791 | crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:845-852 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 3) crates/domains/ironclaw_llm/src/github_copilot_auth.rs:128— crates/domains/ironclaw_llm/src/github_copilot_auth.rs:128-135 | crates/domains/ironclaw_llm/src/github_copilot_auth.rs:176-183 | crates/domains/ironclaw_llm/src/github_copilot_auth.rs:382-389 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 3) crates/extensions/packages/telegram/src/linked/ops/reads.rs:60— crates/extensions/packages/telegram/src/linked/ops/reads.rs:60-67 | crates/extensions/packages/telegram/src/linked/ops/reads.rs:143-150 | crates/extensions/packages/telegram/src/linked/ops/reads.rs:246-253 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 3) crates/kernel/ironclaw_resources/src/filesystem_governor.rs:476— crates/kernel/ironclaw_resources/src/filesystem_governor.rs:476-483 | crates/kernel/ironclaw_resources/src/filesystem_governor.rs:516-523 | crates/kernel/ironclaw_resources/src/filesystem_governor.rs:838-845 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 3) crates/product/ironclaw_openai_compat/src/refs_storage.rs:239— crates/product/ironclaw_openai_compat/src/refs_storage.rs:239-246 | crates/product/ironclaw_openai_compat/src/refs_storage.rs:266-273 | crates/product/ironclaw_openai_compat/src/refs_storage.rs:291-298 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 3) REDACTED:842— REDACTED:842-849 | REDACTED:992-999 | REDACTED:2516-2523 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 3) crates/kernel/ironclaw_approvals/src/auto_approve.rs:259— crates/kernel/ironclaw_approvals/src/auto_approve.rs:259-266 | crates/kernel/ironclaw_approvals/src/capability_permission.rs:470-478 | crates/kernel/ironclaw_approvals/src/policy.rs:528-536 — before extracting anything, compare `crates/kernel/ironclaw_approvals/src/capability_permission.rs` and `crates/kernel/ironclaw_approvals/src/policy.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) crates/contracts/ironclaw_extension_contracts/src/device_link.rs:430— crates/contracts/ironclaw_extension_contracts/src/device_link.rs:430-437 | crates/contracts/ironclaw_extension_contracts/src/linked_session.rs:176-183 | crates/domains/ironclaw_auth/src/provider.rs:202-209 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (8 lines × 3) crates/contracts/ironclaw_extension_contracts/src/device_link.rs:193— crates/contracts/ironclaw_extension_contracts/src/device_link.rs:193-200 | crates/contracts/ironclaw_extension_contracts/src/device_link.rs:439-446 | crates/contracts/ironclaw_extension_contracts/src/linked_session.rs:185-192 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (8 lines × 3) crates/extensions/packages/google-slides/wasm-src/src/api.rs:284— crates/extensions/packages/google-slides/wasm-src/src/api.rs:284-291 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:434-441 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:478-485 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 3) crates/extensions/ironclaw_extension_host/src/available_extensions.rs:433— crates/extensions/ironclaw_extension_host/src/available_extensions.rs:433-440 | crates/extensions/ironclaw_extension_host/src/lifecycle_restore.rs:243-250 | crates/extensions/ironclaw_extension_host/src/lifecycle_restore.rs:325-332 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (8 lines × 3) scripts/reborn_webui_v2_live_qa/run_live_qa.py:5109— scripts/reborn_webui_v2_live_qa/run_live_qa.py:5109-5116 | scripts/reborn_webui_v2_live_qa/run_live_qa.py:5500-5507 | scripts/reborn_webui_v2_live_qa/run_live_qa.py:6100-6107 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
ironclaw_loop_host::model_gateway::complete_model_request (cognitive 57) crates/loop/ironclaw_loop_host/src/model_gateway.rs:1585— ironclaw_loop_host::model_gateway::complete_model_request has cognitive complexity 57 (threshold 15). Drivers by points: if/else 20 (39 pts), match/switch 6 (18 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_loop_host::model_gateway::convert_messages (cognitive 36) crates/loop/ironclaw_loop_host/src/model_gateway.rs:2553— ironclaw_loop_host::model_gateway::convert_messages has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 2 (4 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_loop_host::result_read::parse_result_read_input (cognitive 30) crates/loop/ironclaw_loop_host/src/result_read.rs:679— ironclaw_loop_host::result_read::parse_result_read_input has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 8 (11 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_loop_host::capability_port::provider_input::normalize_provider_value (cognitive 26) crates/loop/ironclaw_loop_host/src/capability_port/provider_input.rs:53— ironclaw_loop_host::capability_port::provider_input::normalize_provider_value has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (24 pts), loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_loop_host::model_gateway::redaction::redact_chat_message (cognitive 22) crates/loop/ironclaw_loop_host/src/model_gateway/redaction.rs:38— ironclaw_loop_host::model_gateway::redaction::redact_chat_message has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 pts), match/switch 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_loop_host::model_gateway::redaction::redact_json_object (cognitive 21) crates/loop/ironclaw_loop_host/src/model_gateway/redaction.rs:114— ironclaw_loop_host::model_gateway::redaction::redact_json_object has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (6 pts), boolean chains 3, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_loop_host::model_gateway::tool_response_to_host (cognitive 19) crates/loop/ironclaw_loop_host/src/model_gateway.rs:2030— ironclaw_loop_host::model_gateway::tool_response_to_host has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (4 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_loop_host::capability_surface_filter::invoke_filtered_batch (cognitive 19) crates/loop/ironclaw_loop_host/src/capability_surface_filter.rs:296— ironclaw_loop_host::capability_surface_filter::invoke_filtered_batch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4, loops 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ironclaw_loop_host::skill_activation::activation::extract_explicit_skill_names (cognitive 18) crates/loop/ironclaw_loop_host/src/skill_activation/activation.rs:2133— ironclaw_loop_host::skill_activation::activation::extract_explicit_skill_names has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_loop_host::skill_activation::activation::normalize_dollar_skill_mentions (cognitive 18) crates/loop/ironclaw_loop_host/src/skill_activation/activation.rs:2166— ironclaw_loop_host::skill_activation::activation::normalize_dollar_skill_mentions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_loop_host::capability_port::extension_id_slug (cognitive 16) crates/loop/ironclaw_loop_host/src/capability_port.rs:3381— ironclaw_loop_host::capability_port::extension_id_slug has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 2, loops 2, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_llm::reasoning::find_code_regions (cyclomatic 47) crates/domains/ironclaw_llm/src/reasoning.rs:53— ironclaw_llm::reasoning::find_code_regions has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_llm::openai_codex_provider::parse_sse_response (cyclomatic 41) crates/domains/ironclaw_llm/src/openai_codex_provider.rs:722— ironclaw_llm::openai_codex_provider::parse_sse_response has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_llm::rig_adapter::convert_messages (cyclomatic 28) crates/domains/ironclaw_llm/src/rig_adapter.rs:520— ironclaw_llm::rig_adapter::convert_messages has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_llm::tool_schema::normalize_schema_recursive (cyclomatic 27) crates/domains/ironclaw_llm/src/tool_schema.rs:277— ironclaw_llm::tool_schema::normalize_schema_recursive has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_llm::agent_message::validate_agent_messages (cyclomatic 24) crates/domains/ironclaw_llm/src/agent_message.rs:243— ironclaw_llm::agent_message::validate_agent_messages has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_llm::anthropic_oauth::ingest_anthropic_event (cyclomatic 21) crates/domains/ironclaw_llm/src/anthropic_oauth.rs:966— ironclaw_llm::anthropic_oauth::ingest_anthropic_event has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_llm::anthropic_oauth::convert_messages (cyclomatic 18) crates/domains/ironclaw_llm/src/anthropic_oauth.rs:1243— ironclaw_llm::anthropic_oauth::convert_messages has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_llm::recording::coerce_python_repr_to_json (cyclomatic 18) crates/domains/ironclaw_llm/src/recording.rs:689— ironclaw_llm::recording::coerce_python_repr_to_json has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ironclaw_llm::smart_routing::score_complexity_internal (cyclomatic 17) crates/domains/ironclaw_llm/src/smart_routing.rs:491— ironclaw_llm::smart_routing::score_complexity_internal has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ironclaw_llm::agent_message::chat_messages_from_agent_messages (cyclomatic 16) crates/domains/ironclaw_llm/src/agent_message.rs:454— ironclaw_llm::agent_message::chat_messages_from_agent_messages has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
TooManyFields: Args tools/ironclaw_stress/src/main.rs:79— TooManyFields — 109 stored fields beside 5 methods. The bar is 30 stored fields; this is 79 over it, 3.63× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: RebornRuntime crates/app/ironclaw_composition/src/runtime.rs:601— TooManyFields — 90 stored fields beside 66 methods. The bar is 30 stored fields; this is 60 over it, 3.00× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: RebornRuntimeStores crates/app/ironclaw_composition/src/factory.rs:263— TooManyFields — 81 stored fields. The bar is 30 stored fields; this is 51 over it, 2.70× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: RunSummary tools/ironclaw_stress/src/main.rs:823— TooManyFields — 55 stored fields. The bar is 30 stored fields; this is 25 over it, 1.83× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: HostRuntimeServices crates/kernel/ironclaw_host_runtime/src/services.rs:130— TooManyFields — 41 stored fields beside 86 methods. The bar is 30 stored fields; this is 11 over it, 1.37× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: RebornServices crates/product/ironclaw_assistant/src/reborn_services.rs:2502— TooManyFields — 39 stored fields beside 181 methods. The bar is 30 stored fields; this is 9 over it, 1.30× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: DefaultPlannedRuntimeParts crates/loop/ironclaw_turn_runner/src/runtime.rs:366— TooManyFields — 39 stored fields. The bar is 30 stored fields; this is 9 over it, 1.30× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: LoopExecutionState crates/loop/ironclaw_agent_loop/src/state.rs:66— TooManyFields — 36 stored fields beside 4 methods. The bar is 30 stored fields; this is 6 over it, 1.20× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: RefreshingCapabilityPort crates/app/ironclaw_composition/src/runtime/capability_host/refreshing_capability_port.rs:149— TooManyFields — 32 stored fields beside 6 methods. The bar is 30 stored fields; this is 2 over it, 1.07× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: RebornLoopDriverHostFactory crates/loop/ironclaw_turn_runner/src/loop_driver_host.rs:1031— TooManyFields — 31 stored fields beside 36 methods. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
Duplicated block (20 lines × 2) crates/domains/ironclaw_llm/src/github_copilot.rs:272— crates/domains/ironclaw_llm/src/github_copilot.rs:272-291 | crates/domains/ironclaw_llm/src/github_copilot.rs:344-363 — 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.
Duplicated block (20 lines × 2) crates/domains/ironclaw_llm/src/retry.rs:212— crates/domains/ironclaw_llm/src/retry.rs:212-231 | crates/domains/ironclaw_llm/src/retry.rs:294-313 — 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.
Duplicated block (20 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service/thread_index.rs:115— crates/domains/ironclaw_threads/src/filesystem_service/thread_index.rs:115-134 | crates/domains/ironclaw_threads/src/filesystem_service/thread_index.rs:136-155 — 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.
Duplicated block (20 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service.rs:4596— crates/domains/ironclaw_threads/src/filesystem_service.rs:4596-4615 | crates/domains/ironclaw_threads/src/in_memory.rs:1979-1998 — before extracting anything, compare `crates/domains/ironclaw_threads/src/filesystem_service.rs` and `crates/domains/ironclaw_threads/src/in_memory.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (20 lines × 2) crates/extensions/packages/google-slides/wasm-src/src/api.rs:412— crates/extensions/packages/google-slides/wasm-src/src/api.rs:412-431 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:456-475 — 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.
Duplicated block (20 lines × 2) crates/extensions/packages/memory-native/src/safety.rs:307— crates/extensions/packages/memory-native/src/safety.rs:307-326 | crates/extensions/packages/memory-native/src/safety.rs:329-348 — 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.
Duplicated block (20 lines × 2) crates/kernel/ironclaw_resources/src/filesystem_governor.rs:693— crates/kernel/ironclaw_resources/src/filesystem_governor.rs:693-712 | crates/kernel/ironclaw_resources/src/filesystem_governor.rs:777-796 — 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.
Duplicated block (20 lines × 2) tools/ironclaw_stress/src/api_capacity.rs:1015— tools/ironclaw_stress/src/api_capacity.rs:1015-1034 | tools/ironclaw_stress/src/api_capacity.rs:1105-1124 — 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.
Duplicated block (20 lines × 2) tools/ironclaw_stress/src/main.rs:2283— tools/ironclaw_stress/src/main.rs:2283-2302 | tools/ironclaw_stress/src/process_pressure.rs:60-79 — before extracting anything, compare `tools/ironclaw_stress/src/main.rs` and `tools/ironclaw_stress/src/process_pressure.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (20 lines × 2) scripts/auth_canary/run_canary.py:46— scripts/auth_canary/run_canary.py:46-65 | scripts/workflow_canary/run_workflow_canary.py:180-199 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/auth_canary/run_canary.py:46` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) crates/domains/ironclaw_llm/src/openai_codex_session.rs:307— crates/domains/ironclaw_llm/src/openai_codex_session.rs:307-313 | crates/domains/ironclaw_llm/src/openai_codex_session.rs:445-451 | crates/domains/ironclaw_llm/src/openai_codex_session.rs:552-558 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) crates/domains/ironclaw_threads/src/filesystem_service.rs:3322— crates/domains/ironclaw_threads/src/filesystem_service.rs:3322-3328 | crates/domains/ironclaw_threads/src/filesystem_service.rs:3362-3368 | crates/domains/ironclaw_threads/src/filesystem_service.rs:3393-3399 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) crates/extensions/packages/github/wasm-src/src/api/issues.rs:228— crates/extensions/packages/github/wasm-src/src/api/issues.rs:228-234 | crates/extensions/packages/github/wasm-src/src/api/pulls.rs:113-120 | crates/extensions/packages/github/wasm-src/src/api/pulls.rs:158-164 — before extracting anything, compare `crates/extensions/packages/github/wasm-src/src/api/issues.rs` and `crates/extensions/packages/github/wasm-src/src/api/pulls.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 3) crates/kernel/ironclaw_approvals/src/capability_permission.rs:442— crates/kernel/ironclaw_approvals/src/capability_permission.rs:442-448 | crates/kernel/ironclaw_approvals/src/policy.rs:500-506 | crates/kernel/ironclaw_authorization/src/lib.rs:1561-1567 — before extracting anything, compare `crates/kernel/ironclaw_approvals/src/capability_permission.rs` and `crates/kernel/ironclaw_approvals/src/policy.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 3) crates/product/ironclaw_webui/src/auth/pending.rs:153— crates/product/ironclaw_webui/src/auth/pending.rs:153-159 | crates/product/ironclaw_webui/src/auth/pending.rs:210-216 | crates/product/ironclaw_webui/src/cli_token_login.rs:350-356 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (7 lines × 3) crates/substrates/ironclaw_secrets/src/secret_store.rs:447— crates/substrates/ironclaw_secrets/src/secret_store.rs:447-453 | crates/substrates/ironclaw_secrets/src/secret_store.rs:479-485 | crates/substrates/ironclaw_secrets/src/secret_store.rs:561-567 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) crates/extensions/packages/google-docs/wasm-src/src/api.rs:56— crates/extensions/packages/google-docs/wasm-src/src/api.rs:56-62 | crates/extensions/packages/google-sheets/wasm-src/src/api.rs:53-59 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:53-59 — before extracting anything, compare `crates/extensions/packages/google-docs/wasm-src/src/api.rs` and `crates/extensions/packages/google-sheets/wasm-src/src/api.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 3) crates/substrates/ironclaw_filesystem/src/in_memory/transaction.rs:37— crates/substrates/ironclaw_filesystem/src/in_memory/transaction.rs:37-43 | REDACTED:1634-1640 | REDACTED:1453-1459 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 318 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 3) scripts/workflow_canary/scenarios/auth_recovery.py:46— scripts/workflow_canary/scenarios/auth_recovery.py:46-52 | scripts/workflow_canary/scenarios/nl_routine_create.py:52-58 | scripts/workflow_canary/scenarios/nl_schedule_update.py:47-53 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 3) test-tools/ascii-renderer/wasm-src/src/lib.rs:70— test-tools/ascii-renderer/wasm-src/src/lib.rs:70-76 | test-tools/hacker-news/wasm-src/src/lib.rs:114-120 | test-tools/market-data/wasm-src/src/lib.rs:47-53 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
ironclaw_documents::html_pdf::parse_blocks (cognitive 50) crates/substrates/ironclaw_documents/src/html_pdf.rs:148— ironclaw_documents::html_pdf::parse_blocks has cognitive complexity 50 (threshold 15). Drivers by points: if/else 13 (40 pts), match/switch 2 (8 pts), boolean chains 1, loops 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_documents::xlsx::set_cell_formula (cognitive 48) crates/substrates/ironclaw_documents/src/xlsx.rs:381— ironclaw_documents::xlsx::set_cell_formula has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (37 pts), boolean chains 6, match/switch 3 (5 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_documents::docx::replace_paragraph_text (cognitive 36) crates/substrates/ironclaw_documents/src/docx.rs:424— ironclaw_documents::docx::replace_paragraph_text has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_documents::xlsx::parse_cells (cognitive 31) crates/substrates/ironclaw_documents/src/xlsx.rs:270— ironclaw_documents::xlsx::parse_cells has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 3 (8 pts), boolean chains 5, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_documents::docx::parse_paragraphs (cognitive 25) crates/substrates/ironclaw_documents/src/docx.rs:111— ironclaw_documents::docx::parse_paragraphs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (16 pts), match/switch 3 (8 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_documents::docx::resolve_revisions (cognitive 24) crates/substrates/ironclaw_documents/src/docx.rs:278— ironclaw_documents::docx::resolve_revisions has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 6 (11 pts), if/else 4 (6 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ironclaw_documents::docx::direct_runs_with_nested_paragraphs (cognitive 23) crates/substrates/ironclaw_documents/src/docx.rs:549— ironclaw_documents::docx::direct_runs_with_nested_paragraphs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (12 pts), match/switch 3 (8 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_documents::html_pdf::decode_entities (cognitive 17) crates/substrates/ironclaw_documents/src/html_pdf.rs:363— ironclaw_documents::html_pdf::decode_entities has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (7 pts), if/else 2 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_documents::xlsx::sheet_parts (cognitive 17) crates/substrates/ironclaw_documents/src/xlsx.rs:194— ironclaw_documents::xlsx::sheet_parts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×9
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/contracts/ironclaw_host_api/src/audit.rs:57— crates/contracts/ironclaw_host_api/src/audit.rs:57-81 | crates/contracts/ironclaw_host_api/src/audit.rs:88-112 | crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:535-587 | crates/kernel/ironclaw_authorization/src/lib.rs:837-846 | crates/kernel/ironclaw_processes/src/types.rs:324-334 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:280— crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:280-305 | crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:310-377 | crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:383-421 | crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:533-556 | crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:665-739 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/domains/ironclaw_triggers/src/libsql.rs:458— crates/domains/ironclaw_triggers/src/libsql.rs:458-477 | crates/domains/ironclaw_triggers/src/libsql.rs:572-590 | crates/domains/ironclaw_triggers/src/libsql.rs:599-632 | crates/domains/ironclaw_triggers/src/libsql.rs:694-718 | crates/domains/ironclaw_triggers/src/libsql.rs:1658-1676 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/extensions/packages/google-docs/wasm-src/src/api.rs:24— crates/extensions/packages/google-docs/wasm-src/src/api.rs:24-42 | crates/extensions/packages/google-drive/wasm-src/src/api.rs:33-48 | crates/extensions/packages/google-sheets/wasm-src/src/api.rs:24-39 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:24-39 | crates/extensions/packages/slack/wasm-src/src/api.rs:211-239 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/extensions/packages/google-docs/wasm-src/src/lib.rs:302— crates/extensions/packages/google-docs/wasm-src/src/lib.rs:302-319 | crates/extensions/packages/google-drive/wasm-src/src/lib.rs:246-263 | crates/extensions/packages/google-sheets/wasm-src/src/lib.rs:249-266 | crates/extensions/packages/google-slides/wasm-src/src/lib.rs:320-337 | crates/extensions/packages/slack/wasm-src/src/lib.rs:265-282 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/extensions/packages/telegram/src/linked/ops/people.rs:79— crates/extensions/packages/telegram/src/linked/ops/people.rs:79-168 | crates/extensions/packages/telegram/src/linked/ops/people.rs:226-277 | crates/extensions/packages/telegram/src/linked/ops/reads.rs:41-91 | crates/extensions/packages/telegram/src/linked/ops/reads.rs:123-183 | crates/extensions/packages/telegram/src/linked/ops/reads.rs:229-289 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/product/ironclaw_assistant/src/reborn_services.rs:1697— crates/product/ironclaw_assistant/src/reborn_services.rs:1697-1715 | crates/product/ironclaw_webui/src/webui_v2/handlers.rs:3378-3402 | crates/product/ironclaw_webui/src/webui_v2/handlers.rs:3409-3433 | crates/product/ironclaw_webui/src/webui_v2/handlers.rs:3438-3474 | crates/product/ironclaw_webui/src/webui_v2/handlers.rs:3585-3609 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED:293— REDACTED:293-337 | REDACTED:1028-1056 | REDACTED:1062-1108 | REDACTED:1744-1787 | REDACTED:2166-2185 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) scripts/workflow_canary/scenarios/bug_logger.py:104— scripts/workflow_canary/scenarios/bug_logger.py:104-198 | scripts/workflow_canary/scenarios/calendar_prep.py:92-224 | scripts/workflow_canary/scenarios/crm_tracker.py:132-265 | scripts/workflow_canary/scenarios/first_immediate_run.py:40-117 | scripts/workflow_canary/scenarios/hn_monitor.py:86-198 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Duplicated block (10 lines × 3) crates/domains/ironclaw_conversations/src/memory.rs:675— crates/domains/ironclaw_conversations/src/memory.rs:675-684 | crates/domains/ironclaw_conversations/src/memory.rs:903-912 | crates/domains/ironclaw_conversations/src/memory.rs:1136-1145 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 3) crates/product/ironclaw_webui/src/product_auth/mod.rs:840— crates/product/ironclaw_webui/src/product_auth/mod.rs:840-849 | crates/product/ironclaw_webui/src/product_auth/mod.rs:870-879 | crates/product/ironclaw_webui/src/product_auth/mod.rs:941-950 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 3) crates/substrates/ironclaw_documents/src/docx.rs:296— crates/substrates/ironclaw_documents/src/docx.rs:296-307 | crates/substrates/ironclaw_documents/src/docx.rs:444-453 | crates/substrates/ironclaw_documents/src/xlsx.rs:396-405 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (10 lines × 3) REDACTED:306— REDACTED:306-315 | REDACTED:1756-1765 | REDACTED:2174-2183 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 3) tools/ironclaw_stress/src/user_turn.rs:1265— tools/ironclaw_stress/src/user_turn.rs:1265-1274 | tools/ironclaw_stress/src/user_turn.rs:1376-1385 | tools/ironclaw_stress/src/user_turn.rs:1437-1446 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 3) crates/contracts/ironclaw_host_api/src/http.rs:71— crates/contracts/ironclaw_host_api/src/http.rs:71-80 | crates/substrates/ironclaw_network/src/types.rs:53-62 | crates/substrates/ironclaw_network/src/types.rs:94-103 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (10 lines × 3) crates/extensions/ironclaw_extension_manager/src/operator_config_capability.rs:228— crates/extensions/ironclaw_extension_manager/src/operator_config_capability.rs:228-237 | crates/extensions/ironclaw_extension_manager/src/operator_config_capability.rs:242-251 | crates/extensions/ironclaw_extension_manager/src/skill_auto_activate_capability.rs:191-200 — before extracting anything, compare `crates/extensions/ironclaw_extension_manager/src/operator_config_capability.rs` and `crates/extensions/ironclaw_extension_manager/src/skill_auto_activate_capability.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 3) crates/extensions/ironclaw_extension_support/src/skills/url_install/github.rs:214— crates/extensions/ironclaw_extension_support/src/skills/url_install/github.rs:214-223 | crates/extensions/ironclaw_extension_support/src/skills/url_install/github.rs:276-285 | crates/extensions/ironclaw_extension_support/src/skills/url_install/github.rs:397-406 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 3) scripts/telegram_smoke/run_smoke.py:159— scripts/telegram_smoke/run_smoke.py:159-168 | scripts/telegram_smoke/run_smoke.py:179-189 | scripts/telegram_smoke/run_smoke.py:203-213 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/telegram_smoke/run_smoke.py:179` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
ironclaw_assistant::run_delivery::triggered::notify_background_run (cyclomatic 53) crates/product/ironclaw_assistant/src/run_delivery/triggered.rs:507— ironclaw_assistant::run_delivery::triggered::notify_background_run has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_assistant::projection::display_preview::input_summary (cyclomatic 49) crates/product/ironclaw_assistant/src/projection/display_preview.rs:577— ironclaw_assistant::projection::display_preview::input_summary has cyclomatic complexity 49 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ironclaw_assistant::delivery_coordinator::publication::worker::run_target (cyclomatic 43) crates/product/ironclaw_assistant/src/delivery_coordinator/publication/worker.rs:64— ironclaw_assistant::delivery_coordinator::publication::worker::run_target has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_assistant::projection::reply::fold_milestone (cyclomatic 27) crates/product/ironclaw_assistant/src/projection/reply.rs:514— ironclaw_assistant::projection::reply::fold_milestone has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_assistant::delivery_coordinator::materialize_workspace_files (cyclomatic 18) crates/product/ironclaw_assistant/src/delivery_coordinator.rs:1187— ironclaw_assistant::delivery_coordinator::materialize_workspace_files has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_assistant::delivery_coordinator::publication::worker::handle_step (cyclomatic 17) crates/product/ironclaw_assistant/src/delivery_coordinator/publication/worker.rs:465— ironclaw_assistant::delivery_coordinator::publication::worker::handle_step has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ironclaw_assistant::delivery_coordinator::publication::kernel_ports::enrich_attention (cyclomatic 16) crates/product/ironclaw_assistant/src/delivery_coordinator/publication/kernel_ports.rs:128— ironclaw_assistant::delivery_coordinator::publication::kernel_ports::enrich_attention has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_assistant::reborn_services::open_product_surface_event_subscription (cyclomatic 16) crates/product/ironclaw_assistant/src/reborn_services.rs:5654— ironclaw_assistant::reborn_services::open_product_surface_event_subscription has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: RebornServices::query (cyclomatic 50) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
FilesystemSessionThreadService::try_write_new_message_transactionally (cognitive 35) crates/domains/ironclaw_threads/src/filesystem_service.rs:637— FilesystemSessionThreadService::try_write_new_message_transactionally has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 5 (15 pts), boolean chains 1, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilesystemSessionThreadService::append_tool_result_reference (cognitive 34) crates/domains/ironclaw_threads/src/filesystem_service.rs:3021— FilesystemSessionThreadService::append_tool_result_reference has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (30 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
FilesystemSessionThreadService::ensure_thread_index_query (cognitive 28) crates/domains/ironclaw_threads/src/filesystem_service/thread_index.rs:109— FilesystemSessionThreadService::ensure_thread_index_query has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilesystemSessionThreadService::migrate_transcript_indexes_for_scope (cognitive 25) crates/domains/ironclaw_threads/src/filesystem_service/transcript_migration.rs:51— FilesystemSessionThreadService::migrate_transcript_indexes_for_scope has cognitive complexity 25 (threshold 15). Drivers by points: if/else 3 (14 pts), loops 3 (6 pts), match/switch 2 (5 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilesystemSessionThreadService::schedule_thread_index_projection_repair (cognitive 23) crates/domains/ironclaw_threads/src/filesystem_service/thread_index/projection_repair.rs:60— FilesystemSessionThreadService::schedule_thread_index_projection_repair has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
FilesystemSessionThreadService::list_threads_for_scope (cognitive 20) crates/domains/ironclaw_threads/src/filesystem_service.rs:3874— FilesystemSessionThreadService::list_threads_for_scope has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (6 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilesystemSessionThreadService::read_thread_messages (cognitive 19) crates/domains/ironclaw_threads/src/filesystem_service/message_read.rs:52— FilesystemSessionThreadService::read_thread_messages has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilesystemSessionThreadService::accept_inbound_message_with_replay_metadata (cognitive 18) crates/domains/ironclaw_threads/src/filesystem_service.rs:1914— FilesystemSessionThreadService::accept_inbound_message_with_replay_metadata has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 4 (6 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Duplicated block (19 lines × 2) crates/domains/ironclaw_llm/src/bedrock.rs:112— crates/domains/ironclaw_llm/src/bedrock.rs:112-130 | crates/domains/ironclaw_llm/src/bedrock.rs:180-198 — 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.
Duplicated block (19 lines × 2) crates/domains/ironclaw_llm/src/bedrock.rs:132— crates/domains/ironclaw_llm/src/bedrock.rs:132-150 | crates/domains/ironclaw_llm/src/bedrock.rs:204-222 — 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.
Duplicated block (19 lines × 2) crates/domains/ironclaw_triggers/src/worker/due_fire.rs:99— crates/domains/ironclaw_triggers/src/worker/due_fire.rs:99-117 | crates/domains/ironclaw_triggers/src/worker/due_fire.rs:125-143 — 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.
Duplicated block (19 lines × 2) crates/loop/ironclaw_loop_host/src/capability_port.rs:2322— crates/loop/ironclaw_loop_host/src/capability_port.rs:2322-2340 | crates/loop/ironclaw_loop_host/src/capability_port.rs:2643-2665 — 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.
Duplicated block (19 lines × 2) crates/product/ironclaw_assistant/src/projection.rs:521— crates/product/ironclaw_assistant/src/projection.rs:521-539 | crates/product/ironclaw_assistant/src/projection.rs:602-620 — 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.
Duplicated block (19 lines × 2) REDACTED:445— REDACTED:445-463 | REDACTED:368-386 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 318 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (19 lines × 2) REDACTED:676— REDACTED:676-699 | REDACTED:713-731 — 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.
Duplicated block (19 lines × 2) crates/kernel/ironclaw_host_runtime/src/egress/pipeline.rs:152— crates/kernel/ironclaw_host_runtime/src/egress/pipeline.rs:152-170 | crates/kernel/ironclaw_host_runtime/src/egress/pipeline.rs:193-211 — 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.
ironclaw_documents::xlsx::parse_cells (cyclomatic 28) crates/substrates/ironclaw_documents/src/xlsx.rs:270— ironclaw_documents::xlsx::parse_cells has cyclomatic complexity 28 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ironclaw_documents::xlsx::set_cell_formula (cyclomatic 28) crates/substrates/ironclaw_documents/src/xlsx.rs:381— ironclaw_documents::xlsx::set_cell_formula has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_documents::html_pdf::parse_blocks (cyclomatic 26) crates/substrates/ironclaw_documents/src/html_pdf.rs:148— ironclaw_documents::html_pdf::parse_blocks has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_documents::docx::resolve_revisions (cyclomatic 24) crates/substrates/ironclaw_documents/src/docx.rs:278— ironclaw_documents::docx::resolve_revisions has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ironclaw_documents::docx::replace_paragraph_text (cyclomatic 23) crates/substrates/ironclaw_documents/src/docx.rs:424— ironclaw_documents::docx::replace_paragraph_text has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_documents::html_pdf::decode_entities (cyclomatic 17) crates/substrates/ironclaw_documents/src/html_pdf.rs:363— ironclaw_documents::html_pdf::decode_entities has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ironclaw_documents::docx::parse_paragraphs (cyclomatic 16) crates/substrates/ironclaw_documents/src/docx.rs:111— ironclaw_documents::docx::parse_paragraphs has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_composition::runtime::build_runtime_with_resource_governor (cognitive 67) crates/app/ironclaw_composition/src/runtime.rs:3111— ironclaw_composition::runtime::build_runtime_with_resource_governor has cognitive complexity 67 (threshold 15). Drivers by points: if/else 38 (43 pts), match/switch 16 (21 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ironclaw_composition::observability::hooks::factory::project_extension_hook_sets (cognitive 28) crates/app/ironclaw_composition/src/observability/hooks/factory.rs:106— ironclaw_composition::observability::hooks::factory::project_extension_hook_sets has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (22 pts), match/switch 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_composition::factory::production_backend_assembly::build_backend_production (cognitive 24) crates/app/ironclaw_composition/src/factory/production_backend_assembly.rs:331— ironclaw_composition::factory::production_backend_assembly::build_backend_production has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (12 pts), match/switch 6, boolean chains 3, loops 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ironclaw_composition::observability::hooks::projection::build_hook_projection_registry (cognitive 20) crates/app/ironclaw_composition/src/observability/hooks/projection.rs:237— ironclaw_composition::observability::hooks::projection::build_hook_projection_registry has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_composition::observability::trajectory_observer::safe_preview_inner (cognitive 20) crates/app/ironclaw_composition/src/observability/trajectory_observer.rs:100— ironclaw_composition::observability::trajectory_observer::safe_preview_inner has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_composition::llm_admin::nearai_mcp::bootstrap_nearai_mcp (cognitive 19) crates/app/ironclaw_composition/src/llm_admin/nearai_mcp.rs:29— ironclaw_composition::llm_admin::nearai_mcp::bootstrap_nearai_mcp has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_composition::automation::trigger_delivery_migration::migrate_one (cognitive 16) crates/app/ironclaw_composition/src/automation/trigger_delivery_migration.rs:93— ironclaw_composition::automation::trigger_delivery_migration::migrate_one has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_processes::journal_store::flusher::commit_pending (cognitive 32) crates/kernel/ironclaw_processes/src/journal_store/flusher.rs:383— ironclaw_processes::journal_store::flusher::commit_pending has cognitive complexity 32 (threshold 15). Drivers by points: match/switch 7 (18 pts), loops 5 (8 pts), if/else 3 (6 pts) (nesting depth added 17). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ironclaw_processes::journal_store::rows::load (cognitive 28) crates/kernel/ironclaw_processes/src/journal_store/rows.rs:301— ironclaw_processes::journal_store::rows::load has cognitive complexity 28 (threshold 15). Drivers by points: loops 13 (14 pts), match/switch 5 (7 pts), if/else 3 (5 pts), boolean chains 2 (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ironclaw_processes::journal_store::rows::dependencies_for_scope_allowed_states (cognitive 26) crates/kernel/ironclaw_processes/src/journal_store/rows.rs:1032— ironclaw_processes::journal_store::rows::dependencies_for_scope_allowed_states has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_processes::journal_store::rows::dependencies_for_scope_canonical_order (cognitive 21) crates/kernel/ironclaw_processes/src/journal_store/rows.rs:917— ironclaw_processes::journal_store::rows::dependencies_for_scope_canonical_order has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_processes::journal_store::flusher::run_flusher (cognitive 19) crates/kernel/ironclaw_processes/src/journal_store/flusher.rs:150— ironclaw_processes::journal_store::flusher::run_flusher has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (10 pts), match/switch 2 (5 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_processes::supervisor::drain_queued (cognitive 17) crates/kernel/ironclaw_processes/src/supervisor.rs:480— ironclaw_processes::supervisor::drain_queued has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_processes::journal_store::migration::legacy_authority_records (cognitive 16) crates/kernel/ironclaw_processes/src/journal_store/migration.rs:533— ironclaw_processes::journal_store::migration::legacy_authority_records has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (6 pts), match/switch 2 (5 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_trace_commons::contribution::maintenance::compact_trace_queue_for_scope_unlocked (cognitive 31) crates/domains/ironclaw_trace_commons/src/contribution/maintenance.rs:23— ironclaw_trace_commons::contribution::maintenance::compact_trace_queue_for_scope_unlocked has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 6 (8 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_trace_commons::contribution::maintenance::trace_queue_telemetry_failure_kind (cognitive 29) crates/domains/ironclaw_trace_commons/src/contribution/maintenance.rs:472— ironclaw_trace_commons::contribution::maintenance::trace_queue_telemetry_failure_kind has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 11, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ironclaw_trace_commons::client::capture_turns_from_conversation_messages_with_outcomes (cognitive 25) crates/domains/ironclaw_trace_commons/src/client.rs:318— ironclaw_trace_commons::client::capture_turns_from_conversation_messages_with_outcomes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_trace_commons::contribution::submission::apply_remote_trace_submission_statuses_for_scope_unlocked (cognitive 23) crates/domains/ironclaw_trace_commons/src/contribution/submission.rs:662— ironclaw_trace_commons::contribution::submission::apply_remote_trace_submission_statuses_for_scope_unlocked has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_trace_commons::contribution::credit::compute_value_scorecard (cognitive 21) crates/domains/ironclaw_trace_commons/src/contribution/credit.rs:106— ironclaw_trace_commons::contribution::credit::compute_value_scorecard has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ironclaw_trace_commons::contribution::submission::flush_trace_contribution_queue_for_scope_with_credential_provider (cognitive 20) crates/domains/ironclaw_trace_commons/src/contribution/submission.rs:202— ironclaw_trace_commons::contribution::submission::flush_trace_contribution_queue_for_scope_with_credential_provider has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 5 (8 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_trace_commons::capture::spawn_trace_queue_flush_worker (cognitive 19) crates/domains/ironclaw_trace_commons/src/capture.rs:186— ironclaw_trace_commons::capture::spawn_trace_queue_flush_worker has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 3 (6 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Duplicated block (21 lines × 2) crates/extensions/ironclaw_extension_host/src/resolver.rs:110— crates/extensions/ironclaw_extension_host/src/resolver.rs:110-130 | crates/kernel/ironclaw_capabilities/src/registry.rs:145-165 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (21 lines × 2) crates/product/ironclaw_openai_compat/src/mount.rs:241— crates/product/ironclaw_openai_compat/src/mount.rs:241-261 | crates/product/ironclaw_openai_compat/src/mount.rs:267-287 — 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.
Duplicated block (21 lines × 2) REDACTED:460— REDACTED:460-480 | REDACTED:508-528 — 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.
Duplicated block (21 lines × 2) REDACTED:923— REDACTED:923-943 | REDACTED:643-663 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 318 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (21 lines × 2) scripts/reborn_webui_v2_live_qa/run_live_qa.py:4991— scripts/reborn_webui_v2_live_qa/run_live_qa.py:4991-5011 | scripts/reborn_webui_v2_live_qa/run_live_qa.py:5997-6017 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `scripts/reborn_webui_v2_live_qa/run_live_qa.py:5996` calls `_live_github_latest_release` and `scripts/reborn_webui_v2_live_qa/run_live_qa.py:4990` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (21 lines × 2) scripts/reborn_webui_v2_live_qa/run_live_qa.py:7181— scripts/reborn_webui_v2_live_qa/run_live_qa.py:7181-7201 | scripts/reborn_webui_v2_live_qa/run_live_qa.py:7217-7237 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (21 lines × 2) crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:283— crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:283-303 | crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:789-809 — 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.
Duplicated block (12–13 lines × 2) crates/domains/ironclaw_llm/src/reasoning.rs:754— crates/domains/ironclaw_llm/src/reasoning.rs:754-766 | crates/domains/ironclaw_llm/src/reasoning.rs:780-791 — 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.
Duplicated block (12–13 lines × 2) crates/domains/ironclaw_trace_commons/src/contribution/maintenance.rs:113— crates/domains/ironclaw_trace_commons/src/contribution/maintenance.rs:113-124 | crates/domains/ironclaw_trace_commons/src/contribution/queue.rs:1035-1047 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (12–13 lines × 2) crates/extensions/ironclaw_extension_support/src/web_access.rs:513— crates/extensions/ironclaw_extension_support/src/web_access.rs:513-524 | crates/lanes/ironclaw_mcp/src/jsonrpc.rs:205-217 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12–13 lines × 2) crates/product/ironclaw_assistant/src/projection/reply.rs:495— crates/product/ironclaw_assistant/src/projection/reply.rs:495-507 | crates/product/ironclaw_assistant/src/projection/reply.rs:682-693 — 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.
Duplicated block (12–13 lines × 2) crates/product/ironclaw_assistant/src/run_delivery/triggered.rs:728— crates/product/ironclaw_assistant/src/run_delivery/triggered.rs:728-740 | crates/product/ironclaw_assistant/src/run_delivery/triggered.rs:781-792 — 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.
Duplicated block (12–13 lines × 2) crates/product/ironclaw_openai_compat/src/chat_workflow.rs:613— crates/product/ironclaw_openai_compat/src/chat_workflow.rs:613-624 | crates/product/ironclaw_openai_compat/src/responses_workflow.rs:773-785 — before extracting anything, compare `crates/product/ironclaw_openai_compat/src/chat_workflow.rs` and `crates/product/ironclaw_openai_compat/src/responses_workflow.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12–13 lines × 2) scripts/ci/check-guidance.py:1152— scripts/ci/check-guidance.py:1152-1164 | scripts/ci/check-target-tree.py:387-398 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/ci/check-guidance.py:1152` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `scripts/ci/check-target-tree.py:399` calls `Path` and `scripts/ci/check-guidance.py:1165` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
ironclaw_loop_host::model_gateway::complete_model_request (cyclomatic 25) crates/loop/ironclaw_loop_host/src/model_gateway.rs:1585— ironclaw_loop_host::model_gateway::complete_model_request has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_loop_host::model_gateway::map_provider_error (cyclomatic 24) crates/loop/ironclaw_loop_host/src/model_gateway.rs:2866— ironclaw_loop_host::model_gateway::map_provider_error has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ironclaw_loop_host::result_read::parse_result_read_input (cyclomatic 23) crates/loop/ironclaw_loop_host/src/result_read.rs:679— ironclaw_loop_host::result_read::parse_result_read_input has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ironclaw_loop_host::model_gateway::convert_messages (cyclomatic 17) crates/loop/ironclaw_loop_host/src/model_gateway.rs:2553— ironclaw_loop_host::model_gateway::convert_messages has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_loop_host::capability_port::provider_input::normalize_provider_value (cyclomatic 16) crates/loop/ironclaw_loop_host/src/capability_port/provider_input.rs:53— ironclaw_loop_host::capability_port::provider_input::normalize_provider_value has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_loop_host::capability_surface_filter::invoke_filtered_batch (cyclomatic 16) crates/loop/ironclaw_loop_host/src/capability_surface_filter.rs:296— ironclaw_loop_host::capability_surface_filter::invoke_filtered_batch has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GeminiOauthProvider::to_gemini_request (cognitive 89) crates/domains/ironclaw_llm/src/gemini_oauth.rs:1439— GeminiOauthProvider::to_gemini_request has cognitive complexity 89 (threshold 15). Drivers by points: if/else 34 (59 pts), boolean chains 17, loops 4 (9 pts), match/switch 2 (4 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GeminiOauthProvider::aggregate_cloud_code_sse (cognitive 77) crates/domains/ironclaw_llm/src/gemini_oauth.rs:1765— GeminiOauthProvider::aggregate_cloud_code_sse has cognitive complexity 77 (threshold 15). Drivers by points: if/else 23 (55 pts), loops 4 (11 pts), boolean chains 7, match/switch 2 (4 pts) (nesting depth added 41). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
GeminiOauthProvider::send_request (cognitive 41) crates/domains/ironclaw_llm/src/gemini_oauth.rs:1174— GeminiOauthProvider::send_request has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (37 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GeminiOauthProvider::ensure_thought_signatures (cognitive 22) crates/domains/ironclaw_llm/src/gemini_oauth.rs:1043— GeminiOauthProvider::ensure_thought_signatures has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GeminiOauthProvider::from_gemini_response (cognitive 18) crates/domains/ironclaw_llm/src/gemini_oauth.rs:1968— GeminiOauthProvider::from_gemini_response has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GeminiOauthProvider::curate_contents (cognitive 17) crates/domains/ironclaw_llm/src/gemini_oauth.rs:1083— GeminiOauthProvider::curate_contents has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CapabilityHost::auth_resume_json (cognitive 47) crates/kernel/ironclaw_capabilities/src/host/auth_resume.rs:43— CapabilityHost::auth_resume_json has cognitive complexity 47 (threshold 15). Drivers by points: if/else 21 (36 pts), match/switch 5 (11 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CapabilityHost::resume_spawn_json (cognitive 30) crates/kernel/ironclaw_capabilities/src/host/spawn_resume.rs:34— CapabilityHost::resume_spawn_json has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (22 pts), match/switch 7, boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
CapabilityHost::authorize (cognitive 29) crates/kernel/ironclaw_capabilities/src/host/authorize.rs:268— CapabilityHost::authorize has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (22 pts), match/switch 5 (7 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CapabilityHost::authorize_spawn (cognitive 29) crates/kernel/ironclaw_capabilities/src/host/spawn.rs:207— CapabilityHost::authorize_spawn has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (22 pts), match/switch 5 (7 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CapabilityHost::dispatch_resumed_capability (cognitive 23) crates/kernel/ironclaw_capabilities/src/host/resume_support.rs:308— CapabilityHost::dispatch_resumed_capability has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 7 (8 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CapabilityHost::enrich_invocation_descriptor (cognitive 21) crates/kernel/ironclaw_capabilities/src/host/authorize.rs:78— CapabilityHost::enrich_invocation_descriptor has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_slack_extension::attachment_transfer::send_files (cognitive 38) crates/extensions/packages/slack/src/attachment_transfer.rs:209— ironclaw_slack_extension::attachment_transfer::send_files has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 10 (17 pts), loops 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_slack_extension::attachment_transfer::read_back_staged_upload (cognitive 35) crates/extensions/packages/slack/src/attachment_transfer.rs:389— ironclaw_slack_extension::attachment_transfer::read_back_staged_upload has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (24 pts), match/switch 3 (6 pts), boolean chains 4, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_slack_extension::mrkdwn::render_slack_mrkdwn (cognitive 34) crates/extensions/packages/slack/src/mrkdwn.rs:9— ironclaw_slack_extension::mrkdwn::render_slack_mrkdwn has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_slack_extension::reply_sink::plan::plan_chunks (cognitive 31) crates/extensions/packages/slack/src/reply_sink/plan.rs:36— ironclaw_slack_extension::reply_sink::plan::plan_chunks has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_slack_extension::reply_sink::plan::publishable_len (cognitive 18) crates/extensions/packages/slack/src/reply_sink/plan.rs:348— ironclaw_slack_extension::reply_sink::plan::publishable_len has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_slack_extension::payload::normalize_user_message (cognitive 17) crates/extensions/packages/slack/src/payload.rs:623— ironclaw_slack_extension::payload::normalize_user_message has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 3, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ironclaw_host_runtime::egress::credential::apply_credential_injection (cognitive 37) crates/kernel/ironclaw_host_runtime/src/egress/credential.rs:388— ironclaw_host_runtime::egress::credential::apply_credential_injection has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (28 pts), match/switch 3 (5 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_host_runtime::first_party_tools::json::parse_query_path (cognitive 31) crates/kernel/ironclaw_host_runtime/src/first_party_tools/json.rs:580— ironclaw_host_runtime::first_party_tools::json::parse_query_path has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 6, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_host_runtime::process_output::read_stream_capped (cognitive 27) crates/kernel/ironclaw_host_runtime/src/process_output.rs:148— ironclaw_host_runtime::process_output::read_stream_capped has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (25 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ironclaw_host_runtime::first_party_tools::shell_core::detect_command_injection (cognitive 27) crates/kernel/ironclaw_host_runtime/src/first_party_tools/shell_core.rs:185— ironclaw_host_runtime::first_party_tools::shell_core::detect_command_injection has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 18, if/else 9. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ironclaw_host_runtime::first_party_tools::shell_core::redirect_targets (cognitive 20) crates/kernel/ironclaw_host_runtime/src/first_party_tools/shell_core.rs:437— ironclaw_host_runtime::first_party_tools::shell_core::redirect_targets has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_host_runtime::egress::sanitize::sanitize_runtime_response (cognitive 16) crates/kernel/ironclaw_host_runtime/src/egress/sanitize.rs:131— ironclaw_host_runtime::egress::sanitize::sanitize_runtime_response has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_skills::selector::extract_skill_mentions (cognitive 36) crates/domains/ironclaw_skills/src/selector.rs:400— ironclaw_skills::selector::extract_skill_mentions has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (27 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ironclaw_skills::management::install_bundle::existing_files_match_expected (cognitive 28) crates/domains/ironclaw_skills/src/management/install_bundle.rs:317— ironclaw_skills::management::install_bundle::existing_files_match_expected has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_skills::management::install_bundle::capture_skill_bundle (cognitive 24) crates/domains/ironclaw_skills/src/management/install_bundle.rs:50— ironclaw_skills::management::install_bundle::capture_skill_bundle has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_skills::validation::normalize_skill_identifier (cognitive 17) crates/domains/ironclaw_skills/src/validation.rs:30— ironclaw_skills::validation::normalize_skill_identifier has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_skills::selector::prefilter_skills_with_options (cognitive 17) crates/domains/ironclaw_skills/src/selector.rs:184— ironclaw_skills::selector::prefilter_skills_with_options has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), match/switch 2 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_skills::selector::score_skill (cognitive 17) crates/domains/ironclaw_skills/src/selector.rs:319— ironclaw_skills::selector::score_skill has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_threads::prepared_context::prepared_seed (cognitive 25) crates/domains/ironclaw_threads/src/prepared_context.rs:520— ironclaw_threads::prepared_context::prepared_seed has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 4 (12 pts), if/else 3 (7 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ironclaw_threads::filesystem_service::thread_index::flush_thread_index_touch_loop (cognitive 24) crates/domains/ironclaw_threads/src/filesystem_service/thread_index.rs:825— ironclaw_threads::filesystem_service::thread_index::flush_thread_index_touch_loop has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 4 (7 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_threads::tool_result_reference::validate_model_observation_detail (cognitive 23) crates/domains/ironclaw_threads/src/tool_result_reference.rs:943— ironclaw_threads::tool_result_reference::validate_model_observation_detail has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ironclaw_threads::attachment_context::model_attachment_block_matches (cognitive 21) crates/domains/ironclaw_threads/src/attachment_context.rs:90— ironclaw_threads::attachment_context::model_attachment_block_matches has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_threads::filesystem_service::thread_index::projection_repair::repair_thread_index_projection (cognitive 17) crates/domains/ironclaw_threads/src/filesystem_service/thread_index/projection_repair.rs:155— ironclaw_threads::filesystem_service::thread_index::projection_repair::repair_thread_index_projection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_threads::summary_artifacts::find_overlapping_summary (cognitive 16) crates/domains/ironclaw_threads/src/summary_artifacts.rs:58— ironclaw_threads::summary_artifacts::find_overlapping_summary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (9–10 lines × 2) crates/app/ironclaw_composition/src/runtime.rs:3224— crates/app/ironclaw_composition/src/runtime.rs:3224-3232 | crates/app/ironclaw_composition/src/runtime.rs:3354-3363 — 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.
Duplicated block (9–10 lines × 2) crates/domains/ironclaw_auth/src/product_auth/durable/paths.rs:87— crates/domains/ironclaw_auth/src/product_auth/durable/paths.rs:87-95 | crates/substrates/ironclaw_secrets/src/secret_store.rs:1282-1291 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9–10 lines × 2) crates/kernel/ironclaw_host_runtime/src/first_party_tools/shell_core.rs:297— crates/kernel/ironclaw_host_runtime/src/first_party_tools/shell_core.rs:297-306 | crates/kernel/ironclaw_host_runtime/src/first_party_tools/shell_core.rs:439-447 — 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.
Duplicated block (9–10 lines × 2) crates/kernel/ironclaw_turns/src/loop_exit.rs:219— crates/kernel/ironclaw_turns/src/loop_exit.rs:219-227 | crates/kernel/ironclaw_turns/src/loop_exit.rs:430-439 — 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.
Duplicated block (9–10 lines × 2) crates/product/ironclaw_assistant/src/workflow.rs:926— crates/product/ironclaw_assistant/src/workflow.rs:926-935 | crates/product/ironclaw_assistant/src/workflow.rs:1048-1056 — 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.
Duplicated block (9–10 lines × 2) crates/product/ironclaw_webui/src/product_auth/oauth.rs:97— crates/product/ironclaw_webui/src/product_auth/oauth.rs:97-105 | crates/product/ironclaw_webui/src/product_auth/oauth.rs:125-134 — 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.
Duplicated block (9 lines × 3) crates/domains/ironclaw_triggers/src/postgres.rs:810— crates/domains/ironclaw_triggers/src/postgres.rs:810-818 | crates/domains/ironclaw_triggers/src/postgres.rs:892-900 | crates/domains/ironclaw_triggers/src/postgres.rs:968-976 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3) crates/product/ironclaw_webui/src/channel_pairing.rs:133— crates/product/ironclaw_webui/src/channel_pairing.rs:133-141 | crates/product/ironclaw_webui/src/product_auth/mod.rs:894-903 | crates/product/ironclaw_webui/src/product_auth/mod.rs:917-927 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9 lines × 3) tools/ironclaw_stress/src/ramp.rs:48— tools/ironclaw_stress/src/ramp.rs:48-56 | tools/ironclaw_stress/src/suite.rs:51-59 | tools/ironclaw_stress/src/sweep.rs:75-83 — before extracting anything, compare `tools/ironclaw_stress/src/ramp.rs` and `tools/ironclaw_stress/src/suite.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 3) crates/domains/ironclaw_llm/src/retry.rs:216— crates/domains/ironclaw_llm/src/retry.rs:216-225 | crates/domains/ironclaw_llm/src/retry.rs:269-277 | crates/domains/ironclaw_llm/src/retry.rs:298-307 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3) crates/app/ironclaw_cli/src/commands/traces/mod.rs:1839— crates/app/ironclaw_cli/src/commands/traces/mod.rs:1839-1847 | crates/domains/ironclaw_trace_commons/src/contribution/maintenance.rs:326-334 | crates/domains/ironclaw_trace_commons/src/contribution/notice.rs:400-408 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (9 lines × 3) scripts/workflow_canary/scenarios/calendar_prep.py:147— scripts/workflow_canary/scenarios/calendar_prep.py:147-158 | scripts/workflow_canary/scenarios/crm_tracker.py:191-199 | scripts/workflow_canary/scenarios/hn_monitor.py:127-138 — before extracting anything, compare `scripts/workflow_canary/scenarios/calendar_prep.py` and `scripts/workflow_canary/scenarios/crm_tracker.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/workflow_canary/scenarios/calendar_prep.py:147` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) crates/app/ironclaw_cli/src/commands/onboard/prompts.rs:175— crates/app/ironclaw_cli/src/commands/onboard/prompts.rs:175-180 | crates/app/ironclaw_cli/src/commands/onboard/prompts.rs:195-200 | crates/app/ironclaw_cli/src/commands/onboard/prompts.rs:284-289 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:138— crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:138-143 | crates/domains/ironclaw_identity/src/identity_store.rs:97-102 | crates/product/ironclaw_webui/src/product_auth/mod.rs:584-589 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (6 lines × 3) crates/extensions/packages/google-docs/wasm-src/src/api.rs:681— crates/extensions/packages/google-docs/wasm-src/src/api.rs:681-686 | crates/extensions/packages/google-sheets/wasm-src/src/api.rs:474-479 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:489-494 — before extracting anything, compare `crates/extensions/packages/google-docs/wasm-src/src/api.rs` and `crates/extensions/packages/google-sheets/wasm-src/src/api.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 3) crates/kernel/ironclaw_processes/src/journal_store/rows.rs:977— crates/kernel/ironclaw_processes/src/journal_store/rows.rs:977-982 | crates/kernel/ironclaw_processes/src/journal_store/rows.rs:1091-1096 | crates/kernel/ironclaw_processes/src/journal_store/rows.rs:1561-1566 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) crates/substrates/ironclaw_filesystem/src/in_memory.rs:340— crates/substrates/ironclaw_filesystem/src/in_memory.rs:340-345 | REDACTED:2597-2602 | REDACTED:1402-1407 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 318 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 3) tools/ironclaw_stress/src/main.rs:2458— tools/ironclaw_stress/src/main.rs:2458-2463 | tools/ironclaw_stress/src/secret_ops.rs:40-45 | tools/ironclaw_stress/src/user_turn.rs:294-299 — before extracting anything, compare `tools/ironclaw_stress/src/secret_ops.rs` and `tools/ironclaw_stress/src/user_turn.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (19 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/design-system/card.tsx:111— crates/product/ironclaw_webui/frontend/src/design-system/card.tsx:111 · crates/product/ironclaw_webui/frontend/src/design-system/card.tsx:147 — all 2 copies are in the same file, 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.
Duplicated block (19 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/lib/device-link-api.ts:263— crates/product/ironclaw_webui/frontend/src/lib/device-link-api.ts:263 · crates/product/ironclaw_webui/frontend/src/lib/device-link-api.ts:329 — 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.
Duplicated block (19 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/chat/components/message-bubble.tsx:199— crates/product/ironclaw_webui/frontend/src/pages/chat/components/message-bubble.tsx:199 · crates/product/ironclaw_webui/frontend/src/pages/chat/components/message-bubble.tsx:222 — 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.
Duplicated block (19 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx:274— crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx:274 · crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx:299 — 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.
Duplicated block (19 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/extensions/components/extension-card.tsx:301— crates/product/ironclaw_webui/frontend/src/pages/extensions/components/extension-card.tsx:301 · crates/product/ironclaw_webui/frontend/src/pages/extensions/components/extension-card.tsx:383 — 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.
Duplicated block (19 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts:442— crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts:442 · crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts:750 — 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.
CapabilityHost::resume_spawn_json (cyclomatic 26) crates/kernel/ironclaw_capabilities/src/host/spawn_resume.rs:34— CapabilityHost::resume_spawn_json has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CapabilityHost::auth_resume_json (cyclomatic 22) crates/kernel/ironclaw_capabilities/src/host/auth_resume.rs:43— CapabilityHost::auth_resume_json has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CapabilityHost::authorize (cyclomatic 19) crates/kernel/ironclaw_capabilities/src/host/authorize.rs:268— CapabilityHost::authorize has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CapabilityHost::authorize_spawn (cyclomatic 19) crates/kernel/ironclaw_capabilities/src/host/spawn.rs:207— CapabilityHost::authorize_spawn has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CapabilityHost::dispatch_resumed_capability (cyclomatic 18) crates/kernel/ironclaw_capabilities/src/host/resume_support.rs:308— CapabilityHost::dispatch_resumed_capability has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ironclaw_extension_support::skills::url_install::zip_bundle::extract_skill_bundle (cyclomatic 25) crates/extensions/ironclaw_extension_support/src/skills/url_install/zip_bundle.rs:26— ironclaw_extension_support::skills::url_install::zip_bundle::extract_skill_bundle has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_extension_support::coding::grep_tool::grep (cyclomatic 22) crates/extensions/ironclaw_extension_support/src/coding/grep_tool.rs:36— ironclaw_extension_support::coding::grep_tool::grep has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ironclaw_extension_support::gsuite::handlers::gmail_message::select_body (cyclomatic 20) crates/extensions/ironclaw_extension_support/src/gsuite/handlers/gmail_message.rs:195— ironclaw_extension_support::gsuite::handlers::gmail_message::select_body has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ironclaw_extension_support::coding::file::read_file (cyclomatic 16) crates/extensions/ironclaw_extension_support/src/coding/file.rs:40— ironclaw_extension_support::coding::file::read_file has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ironclaw_extension_support::coding::text::replace_content (cyclomatic 16) crates/extensions/ironclaw_extension_support/src/coding/text.rs:312— ironclaw_extension_support::coding::text::replace_content has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw::runtime::trigger_poller::trigger_poller_settings (cognitive 36) crates/app/ironclaw_cli/src/runtime/trigger_poller.rs:49— ironclaw::runtime::trigger_poller::trigger_poller_settings has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw::runtime::run_repl_loop (cognitive 22) crates/app/ironclaw_cli/src/runtime/mod.rs:260— ironclaw::runtime::run_repl_loop has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 3 (9 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw::commands::traces::show_queue_status (cognitive 17) crates/app/ironclaw_cli/src/commands/traces/mod.rs:805— ironclaw::commands::traces::show_queue_status has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 2 (4 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ironclaw::commands::traces::apply_cli_submission_status_updates_to_records (cognitive 17) crates/app/ironclaw_cli/src/commands/traces/mod.rs:1441— ironclaw::commands::traces::apply_cli_submission_status_updates_to_records has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw::commands::models::print_provider_list (cognitive 16) crates/app/ironclaw_cli/src/commands/models.rs:127— ironclaw::commands::models::print_provider_list has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExtensionLifecycleManager::remove (cognitive 36) crates/extensions/ironclaw_extension_host/src/product_lifecycle.rs:1706— ExtensionLifecycleManager::remove has cognitive complexity 36 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 10, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ExtensionLifecycleManager::remove_locked (cognitive 33) crates/extensions/ironclaw_extension_host/src/product_lifecycle.rs:2258— ExtensionLifecycleManager::remove_locked has cognitive complexity 33 (threshold 15). Drivers by points: if/else 21 (30 pts), match/switch 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExtensionLifecycleManager::install_registry_package (cognitive 27) crates/extensions/ironclaw_extension_host/src/product_lifecycle.rs:1160— ExtensionLifecycleManager::install_registry_package has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 5, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExtensionLifecycleManager::commit_activation (cognitive 23) crates/extensions/ironclaw_extension_host/src/product_lifecycle.rs:1551— ExtensionLifecycleManager::commit_activation has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExtensionLifecycleManager::remove_orphaned_runtime_state (cognitive 20) crates/extensions/ironclaw_extension_host/src/product_lifecycle.rs:2171— ExtensionLifecycleManager::remove_orphaned_runtime_state has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extension_host::recipes::unified_vendor_recipes (cognitive 34) crates/extensions/ironclaw_extension_host/src/recipes.rs:40— ironclaw_extension_host::recipes::unified_vendor_recipes has cognitive complexity 34 (threshold 15). Drivers by points: if/else 4 (17 pts), loops 3 (8 pts), match/switch 2 (7 pts), boolean chains 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extension_host::ingress::verifier::verify_hmac (cognitive 20) crates/extensions/ironclaw_extension_host/src/ingress/verifier.rs:182— ironclaw_extension_host::ingress::verifier::verify_hmac has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 3 (5 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extension_host::admin_configuration_service::validate_submitted (cognitive 19) crates/extensions/ironclaw_extension_host/src/admin_configuration_service.rs:429— ironclaw_extension_host::admin_configuration_service::validate_submitted has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 2, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extension_host::lifecycle_restore::restore_extension_lifecycle_state (cognitive 18) crates/extensions/ironclaw_extension_host/src/lifecycle_restore.rs:22— ironclaw_extension_host::lifecycle_restore::restore_extension_lifecycle_state has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extension_host::available_extensions::credential_requirements (cognitive 17) crates/extensions/ironclaw_extension_host/src/available_extensions.rs:290— ironclaw_extension_host::available_extensions::credential_requirements has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×5
Duplicated block (5 lines × 3) REDACTED:895— REDACTED:895-899 | REDACTED:1005-1009 | REDACTED:2420-2424 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) tools/ironclaw_stress/src/ramp.rs:124— tools/ironclaw_stress/src/ramp.rs:124-128 | tools/ironclaw_stress/src/suite.rs:138-142 | tools/ironclaw_stress/src/sweep.rs:215-219 — before extracting anything, compare `tools/ironclaw_stress/src/ramp.rs` and `tools/ironclaw_stress/src/suite.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) crates/extensions/packages/google-docs/wasm-src/src/api.rs:161— crates/extensions/packages/google-docs/wasm-src/src/api.rs:161-165 | crates/extensions/packages/google-sheets/wasm-src/src/api.rs:387-391 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:130-134 — before extracting anything, compare `crates/extensions/packages/google-docs/wasm-src/src/api.rs` and `crates/extensions/packages/google-sheets/wasm-src/src/api.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) scripts/reborn_qa_matrix/audit_defect_traceability.py:188— scripts/reborn_qa_matrix/audit_defect_traceability.py:188-192 | scripts/reborn_qa_matrix/audit_execution_evidence.py:193-197 | scripts/reborn_qa_matrix/audit_workbook_completeness.py:151-155 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (5 lines × 3) scripts/live_canary/common.py:129— scripts/live_canary/common.py:129-133 | scripts/slack_smoke/run_smoke.py:54-58 | scripts/telegram_smoke/run_smoke.py:54-58 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/lib/notification-setup-api.ts:49— crates/product/ironclaw_webui/frontend/src/lib/notification-setup-api.ts:49 · crates/product/ironclaw_webui/frontend/src/lib/notification-setup-api.ts:62 — 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.
Duplicated block (12 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/lib/vm-component-harness.ts:29— crates/product/ironclaw_webui/frontend/src/lib/vm-component-harness.ts:29 · crates/product/ironclaw_webui/frontend/src/lib/vm-inline-source.ts:18 — 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.
Duplicated block (12 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/chat/chat.tsx:491— crates/product/ironclaw_webui/frontend/src/pages/chat/chat.tsx:491 · crates/product/ironclaw_webui/frontend/src/pages/chat/chat.tsx:624 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
Duplicated block (12 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:827— crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:827 · crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:847 — 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.
Duplicated block (12 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts:296— crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts:296 · crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts:356 — 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.
ironclaw_stress::validate_args (cyclomatic 106) tools/ironclaw_stress/src/main.rs:1124— ironclaw_stress::validate_args has cyclomatic complexity 106 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ironclaw_stress::apply_preset (cyclomatic 91) tools/ironclaw_stress/src/main.rs:987— ironclaw_stress::apply_preset has cyclomatic complexity 91 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ironclaw_stress::sweep::build_cases (cyclomatic 22) tools/ironclaw_stress/src/sweep.rs:317— ironclaw_stress::sweep::build_cases has cyclomatic complexity 22 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ironclaw_stress::api_capacity::run_window (cyclomatic 18) tools/ironclaw_stress/src/api_capacity.rs:709— ironclaw_stress::api_capacity::run_window has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ironclaw_host_runtime::first_party_tools::shell_core::detect_command_injection (cyclomatic 28) crates/kernel/ironclaw_host_runtime/src/first_party_tools/shell_core.rs:185— ironclaw_host_runtime::first_party_tools::shell_core::detect_command_injection has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ironclaw_host_runtime::egress::credential::apply_credential_injection (cyclomatic 22) crates/kernel/ironclaw_host_runtime/src/egress/credential.rs:388— ironclaw_host_runtime::egress::credential::apply_credential_injection has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_host_runtime::first_party_tools::json::parse_query_path (cyclomatic 20) crates/kernel/ironclaw_host_runtime/src/first_party_tools/json.rs:580— ironclaw_host_runtime::first_party_tools::json::parse_query_path has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_host_runtime::first_party_tools::json::dispatch (cyclomatic 16) crates/kernel/ironclaw_host_runtime/src/first_party_tools/json.rs:31— ironclaw_host_runtime::first_party_tools::json::dispatch has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ironclaw_slack_extension::attachment_transfer::send_files (cyclomatic 24) crates/extensions/packages/slack/src/attachment_transfer.rs:209— ironclaw_slack_extension::attachment_transfer::send_files has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ironclaw_slack_extension::reply_sink::plan::plan_chunks (cyclomatic 22) crates/extensions/packages/slack/src/reply_sink/plan.rs:36— ironclaw_slack_extension::reply_sink::plan::plan_chunks has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_slack_extension::attachment_transfer::read_back_staged_upload (cyclomatic 20) crates/extensions/packages/slack/src/attachment_transfer.rs:389— ironclaw_slack_extension::attachment_transfer::read_back_staged_upload has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_slack_extension::payload::normalize_slack_event (cyclomatic 16) crates/extensions/packages/slack/src/payload.rs:193— ironclaw_slack_extension::payload::normalize_slack_event has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ProcessJournalMaterializedState::apply_command (cyclomatic 23) crates/kernel/ironclaw_processes/src/journal_store/state.rs:202— ProcessJournalMaterializedState::apply_command has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ProcessJournalMaterializedState::apply_submit (cyclomatic 18) crates/kernel/ironclaw_processes/src/journal_store/state.rs:294— ProcessJournalMaterializedState::apply_submit has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ProcessJournalMaterializedState::apply_submit_at_edge (cyclomatic 16) crates/kernel/ironclaw_processes/src/journal_store/state.rs:490— ProcessJournalMaterializedState::apply_submit_at_edge has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ProcessJournalMaterializedState::apply_control (cyclomatic 16) crates/kernel/ironclaw_processes/src/journal_store/state.rs:909— ProcessJournalMaterializedState::apply_control has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RunDeliveryObserver::deliver_final_reply (cognitive 92) crates/product/ironclaw_assistant/src/run_delivery/observer.rs:445— RunDeliveryObserver::deliver_final_reply has cognitive complexity 92 (threshold 15). Drivers by points: if/else 30 (68 pts), boolean chains 11, loops 3 (8 pts), match/switch 3 (5 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RunDeliveryObserver::notification_for_actionable_state (cognitive 25) crates/product/ironclaw_assistant/src/run_delivery/observer.rs:1127— RunDeliveryObserver::notification_for_actionable_state has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 5 (11 pts), boolean chains 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
RunDeliveryObserver::wait_for_actionable (cognitive 18) crates/product/ironclaw_assistant/src/run_delivery/observer.rs:930— RunDeliveryObserver::wait_for_actionable has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RunDeliveryObserver::busy_hint_from_run_state (cognitive 18) crates/product/ironclaw_assistant/src/run_delivery/observer.rs:1739— RunDeliveryObserver::busy_hint_from_run_state has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 7 (18 pts) (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ironclaw_webui::webui_v2::handlers::build_sse_stream (cognitive 63) crates/product/ironclaw_webui/src/webui_v2/handlers.rs:1584— ironclaw_webui::webui_v2::handlers::build_sse_stream has cognitive complexity 63 (threshold 15). Drivers by points: if/else 8 (29 pts), match/switch 7 (21 pts), loops 4 (13 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_webui::webui_v2::handlers::ws_drain_loop (cognitive 50) crates/product/ironclaw_webui/src/webui_v2/handlers.rs:4644— ironclaw_webui::webui_v2::handlers::ws_drain_loop has cognitive complexity 50 (threshold 15). Drivers by points: if/else 8 (28 pts), match/switch 7 (18 pts), loops 2 (4 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_webui::webui_v2::inspector::build_update_stream (cognitive 31) crates/product/ironclaw_webui/src/webui_v2/inspector.rs:266— ironclaw_webui::webui_v2::inspector::build_update_stream has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 4 (9 pts), loops 2 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_webui::webui_ws_origin::enforce_websocket_origin (cognitive 21) crates/product/ironclaw_webui/src/webui_ws_origin.rs:135— ironclaw_webui::webui_ws_origin::enforce_websocket_origin has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 2, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extractors::parse_xlsx_sheet (cognitive 33) crates/domains/ironclaw_extractors/src/lib.rs:677— ironclaw_extractors::parse_xlsx_sheet has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (26 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extractors::extract_rtf (cognitive 29) crates/domains/ironclaw_extractors/src/lib.rs:505— ironclaw_extractors::extract_rtf has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (7 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extractors::extract_xlsx (cognitive 20) crates/domains/ironclaw_extractors/src/lib.rs:402— ironclaw_extractors::extract_xlsx has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, loops 2, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extractors::extract_pptx (cognitive 16) crates/domains/ironclaw_extractors/src/lib.rs:345— ironclaw_extractors::extract_pptx has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 2, loops 2, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodexChatGptProvider::handle_sse_event (cognitive 31) crates/domains/ironclaw_llm/src/codex_chatgpt.rs:868— CodexChatGptProvider::handle_sse_event has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 4, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CodexChatGptProvider::parse_sse_stream (cognitive 23) crates/domains/ironclaw_llm/src/codex_chatgpt.rs:723— CodexChatGptProvider::parse_sse_stream has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodexChatGptProvider::message_to_input_items (cognitive 21) crates/domains/ironclaw_llm/src/codex_chatgpt.rs:445— CodexChatGptProvider::message_to_input_items has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2 (4 pts), loops 1 (3 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CodexChatGptProvider::send_request_with_sink (cognitive 19) crates/domains/ironclaw_llm/src/codex_chatgpt.rs:580— CodexChatGptProvider::send_request_with_sink has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (19 pts) (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
TooManyFunctions: ironclaw_turn_runner::planned_driver_factory crates/loop/ironclaw_turn_runner/src/planned_driver_factory.rs:87— TooManyFunctions — 34 free functions. The bar is 30 free functions; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyFunctions: ironclaw_extension_support::coding::paths crates/extensions/ironclaw_extension_support/src/coding/paths.rs:20— TooManyFunctions — 32 free functions. The bar is 30 free functions; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyFunctions: ironclaw_loop_host::capability_port::provider_input crates/loop/ironclaw_loop_host/src/capability_port/provider_input.rs:9— TooManyFunctions — 32 free functions. The bar is 30 free functions; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyFunctions: ironclaw_safety::display_redaction crates/substrates/ironclaw_safety/src/display_redaction.rs:15— TooManyFunctions — 32 free functions. The bar is 30 free functions; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (23 lines × 2) crates/app/ironclaw_composition/src/factory/production_build_assembly.rs:474— crates/app/ironclaw_composition/src/factory/production_build_assembly.rs:474-496 | crates/kernel/ironclaw_host_runtime/src/services.rs:926-948 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (23 lines × 2) crates/domains/ironclaw_skills/src/learning.rs:121— crates/domains/ironclaw_skills/src/learning.rs:121-143 | crates/domains/ironclaw_skills/src/learning.rs:201-223 — 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.
Duplicated block (23 lines × 2) crates/kernel/ironclaw_host_runtime/src/latency.rs:160— crates/kernel/ironclaw_host_runtime/src/latency.rs:160-182 | crates/kernel/ironclaw_host_runtime/src/latency.rs:201-223 — 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.
Duplicated block (23 lines × 2) crates/product/ironclaw_assistant/src/projection.rs:1369— crates/product/ironclaw_assistant/src/projection.rs:1369-1391 | crates/product/ironclaw_assistant/src/projection.rs:1409-1431 — 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.
Duplicated block (15–16 lines × 2) crates/domains/ironclaw_auth/src/fakes.rs:614— crates/domains/ironclaw_auth/src/fakes.rs:614-628 | crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:597-612 — before extracting anything, compare `crates/domains/ironclaw_auth/src/fakes.rs` and `crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15–16 lines × 2) crates/domains/ironclaw_llm/src/codex_chatgpt.rs:617— crates/domains/ironclaw_llm/src/codex_chatgpt.rs:617-631 | crates/domains/ironclaw_llm/src/codex_chatgpt.rs:643-658 — 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.
Duplicated block (15–16 lines × 2) REDACTED:839— REDACTED:839-853 | REDACTED:2512-2527 — 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.
Duplicated block (15–16 lines × 2) scripts/reborn_webui_v2_live_qa/google_api_helpers.py:133— scripts/reborn_webui_v2_live_qa/google_api_helpers.py:133-147 | scripts/reborn_webui_v2_live_qa/google_api_helpers.py:165-180 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/reborn_webui_v2_live_qa/google_api_helpers.py:133` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 2) crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:784— crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:784-798 | crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:845-858 — 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.
Duplicated block (14–15 lines × 2) crates/kernel/ironclaw_host_runtime/src/first_party_tools/trace_commons.rs:787— crates/kernel/ironclaw_host_runtime/src/first_party_tools/trace_commons.rs:787-801 | crates/kernel/ironclaw_host_runtime/src/first_party_tools/trace_commons.rs:1110-1123 — 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.
Duplicated block (14–15 lines × 2) crates/product/ironclaw_webui/src/webui_v2/handlers.rs:3118— crates/product/ironclaw_webui/src/webui_v2/handlers.rs:3118-3132 | crates/product/ironclaw_webui/src/webui_v2/handlers.rs:3171-3184 — 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.
Duplicated block (14–15 lines × 2) scripts/slack_smoke/run_smoke.py:149— scripts/slack_smoke/run_smoke.py:149-162 | scripts/slack_smoke/run_smoke.py:241-255 — 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.
Duplicated block (13 lines × 3) crates/lanes/ironclaw_sandbox/src/sandbox_process/managed_egress.rs:1325— crates/lanes/ironclaw_sandbox/src/sandbox_process/managed_egress.rs:1325-1337 | crates/lanes/ironclaw_sandbox/src/sandbox_process/managed_egress.rs:1347-1359 | crates/lanes/ironclaw_sandbox/src/sandbox_process/user_container.rs:479-491 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (13 lines × 3) crates/product/ironclaw_assistant/src/projection.rs:531— crates/product/ironclaw_assistant/src/projection.rs:531-543 | crates/product/ironclaw_assistant/src/projection.rs:572-584 | crates/product/ironclaw_assistant/src/projection.rs:612-624 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (13 lines × 3) crates/domains/ironclaw_triggers/src/libsql.rs:1143— crates/domains/ironclaw_triggers/src/libsql.rs:1143-1155 | crates/domains/ironclaw_triggers/src/libsql.rs:1258-1270 | crates/domains/ironclaw_triggers/src/libsql.rs:1337-1349 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (13 lines × 3) crates/loop/ironclaw_loop_host/src/model_gateway.rs:1729— crates/loop/ironclaw_loop_host/src/model_gateway.rs:1729-1741 | crates/loop/ironclaw_loop_host/src/model_gateway.rs:1808-1820 | crates/loop/ironclaw_loop_host/src/model_gateway.rs:1917-1929 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11–13 lines × 2) crates/domains/ironclaw_auth/src/fakes.rs:870— crates/domains/ironclaw_auth/src/fakes.rs:870-882 | crates/domains/ironclaw_auth/src/product_auth/durable/accounts.rs:168-178 — before extracting anything, compare `crates/domains/ironclaw_auth/src/fakes.rs` and `crates/domains/ironclaw_auth/src/product_auth/durable/accounts.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11–13 lines × 2) crates/domains/ironclaw_llm/src/openai_codex_session.rs:615— crates/domains/ironclaw_llm/src/openai_codex_session.rs:615-625 | crates/domains/ironclaw_llm/src/session.rs:415-427 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11–13 lines × 2) crates/domains/ironclaw_llm/src/recording.rs:735— crates/domains/ironclaw_llm/src/recording.rs:735-747 | crates/domains/ironclaw_llm/src/recording.rs:754-764 — 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.
Duplicated block (11–13 lines × 2) crates/extensions/packages/memory-native/src/repo/filesystem.rs:945— crates/extensions/packages/memory-native/src/repo/filesystem.rs:945-955 | crates/extensions/packages/memory-native/src/repo/filesystem.rs:964-976 — 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.
Duplicated block (11–12 lines × 2) crates/domains/ironclaw_llm/src/github_copilot_auth.rs:305— crates/domains/ironclaw_llm/src/github_copilot_auth.rs:305-315 | crates/domains/ironclaw_llm/src/github_copilot_auth.rs:367-378 — 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.
Duplicated block (11–12 lines × 2) crates/domains/ironclaw_threads/src/in_memory.rs:476— crates/domains/ironclaw_threads/src/in_memory.rs:476-487 | crates/domains/ironclaw_threads/src/in_memory.rs:1786-1796 — 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.
Duplicated block (11–12 lines × 2) REDACTED:2244— REDACTED:2244-2255 | REDACTED:3142-3152 — 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.
Duplicated block (11–12 lines × 2) tools/ironclaw_stress/src/ramp.rs:92— tools/ironclaw_stress/src/ramp.rs:92-103 | tools/ironclaw_stress/src/sweep.rs:168-178 — before extracting anything, compare `tools/ironclaw_stress/src/ramp.rs` and `tools/ironclaw_stress/src/sweep.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 3) crates/extensions/ironclaw_extension_manager/src/operator_config_capability.rs:93— crates/extensions/ironclaw_extension_manager/src/operator_config_capability.rs:93-103 | crates/extensions/ironclaw_extension_manager/src/operator_config_capability.rs:122-132 | crates/extensions/ironclaw_extension_manager/src/skill_auto_activate_capability.rs:77-87 — before extracting anything, compare `crates/extensions/ironclaw_extension_manager/src/operator_config_capability.rs` and `crates/extensions/ironclaw_extension_manager/src/skill_auto_activate_capability.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 3) crates/product/ironclaw_openai_compat/src/refs_storage.rs:250— crates/product/ironclaw_openai_compat/src/refs_storage.rs:250-260 | crates/product/ironclaw_openai_compat/src/refs_storage.rs:275-285 | crates/product/ironclaw_openai_compat/src/refs_storage.rs:300-310 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11 lines × 3) tools/ironclaw_stress/src/db_probe.rs:1148— tools/ironclaw_stress/src/db_probe.rs:1148-1158 | tools/ironclaw_stress/src/db_probe.rs:1190-1200 | tools/ironclaw_stress/src/db_probe.rs:1232-1242 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11 lines × 3) crates/kernel/ironclaw_resources/src/filesystem_governor.rs:648— crates/kernel/ironclaw_resources/src/filesystem_governor.rs:648-658 | crates/kernel/ironclaw_resources/src/filesystem_governor.rs:717-727 | crates/kernel/ironclaw_resources/src/filesystem_governor.rs:801-811 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10–11 lines × 2) crates/domains/ironclaw_identity/src/identity_store.rs:260— crates/domains/ironclaw_identity/src/identity_store.rs:260-270 | crates/domains/ironclaw_identity/src/identity_store.rs:435-444 — 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.
Duplicated block (10–11 lines × 2) crates/domains/ironclaw_llm/src/anthropic_oauth.rs:209— crates/domains/ironclaw_llm/src/anthropic_oauth.rs:209-219 | crates/domains/ironclaw_llm/src/anthropic_oauth.rs:250-259 — 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.
Duplicated block (10–11 lines × 2) crates/product/ironclaw_operator/src/llm_admin/llm_config_service.rs:435— crates/product/ironclaw_operator/src/llm_admin/llm_config_service.rs:435-445 | crates/product/ironclaw_operator/src/llm_admin/llm_config_service.rs:1318-1327 — 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.
Duplicated block (10–11 lines × 2) tools/ironclaw_stress/src/capture.rs:39— tools/ironclaw_stress/src/capture.rs:39-49 | tools/ironclaw_stress/src/human.rs:154-163 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 4) crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:510— crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:510-518 | crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:563-571 | crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:592-600 | crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:628-636 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 4) crates/domains/ironclaw_threads/src/filesystem_service.rs:1727— crates/domains/ironclaw_threads/src/filesystem_service.rs:1727-1735 | crates/domains/ironclaw_threads/src/filesystem_service/thread_index.rs:706-714 | crates/domains/ironclaw_threads/src/filesystem_service/thread_index.rs:752-760 | crates/domains/ironclaw_threads/src/filesystem_service/transcript_migration.rs:56-64 — before extracting anything, compare `crates/domains/ironclaw_threads/src/filesystem_service/thread_index.rs` and `crates/domains/ironclaw_threads/src/filesystem_service/transcript_migration.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 4) crates/kernel/ironclaw_host_runtime/src/latency.rs:163— crates/kernel/ironclaw_host_runtime/src/latency.rs:163-171 | crates/kernel/ironclaw_host_runtime/src/latency.rs:204-212 | crates/kernel/ironclaw_host_runtime/src/services/process_executor.rs:76-84 | crates/kernel/ironclaw_host_runtime/src/services/process_executor.rs:104-112 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9 lines × 4) tools/ironclaw_stress/src/compare.rs:482— tools/ironclaw_stress/src/compare.rs:482-490 | tools/ironclaw_stress/src/ramp.rs:377-385 | tools/ironclaw_stress/src/suite.rs:628-636 | tools/ironclaw_stress/src/sweep.rs:586-594 — before extracting anything, compare `tools/ironclaw_stress/src/ramp.rs` and `tools/ironclaw_stress/src/suite.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 5) crates/domains/ironclaw_auth/src/product_auth/durable/paths.rs:88— crates/domains/ironclaw_auth/src/product_auth/durable/paths.rs:88-95 | crates/kernel/ironclaw_approvals/src/approval_store.rs:567-574 | crates/kernel/ironclaw_capabilities/src/replay_payload.rs:286-293 | crates/kernel/ironclaw_processes/src/result_store.rs:211-218 | crates/substrates/ironclaw_secrets/src/secret_store.rs:1283-1290 — before extracting anything, compare `crates/kernel/ironclaw_approvals/src/approval_store.rs` and `crates/kernel/ironclaw_capabilities/src/replay_payload.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 5) crates/product/ironclaw_assistant/src/reborn_services.rs:1701— crates/product/ironclaw_assistant/src/reborn_services.rs:1701-1708 | crates/product/ironclaw_webui/src/webui_v2/handlers.rs:3383-3390 | crates/product/ironclaw_webui/src/webui_v2/handlers.rs:3414-3421 | crates/product/ironclaw_webui/src/webui_v2/handlers.rs:3443-3450 | crates/product/ironclaw_webui/src/webui_v2/handlers.rs:3591-3598 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (8 lines × 5) REDACTED:303— REDACTED:303-310 | REDACTED:1034-1041 | REDACTED:1079-1086 | REDACTED:1753-1760 | REDACTED:2171-2178 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 5) crates/kernel/ironclaw_approvals/src/approval_store.rs:608— crates/kernel/ironclaw_approvals/src/approval_store.rs:608-615 | crates/kernel/ironclaw_authorization/src/lib.rs:1499-1506 | crates/kernel/ironclaw_capabilities/src/replay_payload.rs:313-320 | crates/kernel/ironclaw_processes/src/types.rs:337-344 | crates/product/ironclaw_assistant/src/approval_interaction/read_model.rs:158-165 — before extracting anything, compare `crates/kernel/ironclaw_approvals/src/approval_store.rs` and `crates/kernel/ironclaw_capabilities/src/replay_payload.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 4) crates/extensions/packages/google-docs/wasm-src/src/lib.rs:112— crates/extensions/packages/google-docs/wasm-src/src/lib.rs:112-118 | crates/extensions/packages/google-sheets/wasm-src/src/lib.rs:100-106 | crates/extensions/packages/google-slides/wasm-src/src/lib.rs:112-118 | crates/extensions/packages/slack/wasm-src/src/lib.rs:105-111 — before extracting anything, compare `crates/extensions/packages/google-docs/wasm-src/src/lib.rs` and `crates/extensions/packages/google-sheets/wasm-src/src/lib.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 4) REDACTED:890— REDACTED:890-896 | REDACTED:996-1002 | REDACTED:2415-2421 | REDACTED:2557-2563 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 4) REDACTED:1224— REDACTED:1224-1230 | REDACTED:1251-1257 | REDACTED:886-892 | REDACTED:914-920 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 318 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 4) crates/domains/ironclaw_threads/src/filesystem_service.rs:4260— crates/domains/ironclaw_threads/src/filesystem_service.rs:4260-4266 | crates/kernel/ironclaw_approvals/src/approval_store.rs:569-575 | crates/kernel/ironclaw_capabilities/src/replay_payload.rs:288-294 | crates/kernel/ironclaw_processes/src/result_store.rs:213-219 — before extracting anything, compare `crates/kernel/ironclaw_approvals/src/approval_store.rs` and `crates/kernel/ironclaw_capabilities/src/replay_payload.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 5) crates/contracts/ironclaw_host_api/src/audit.rs:63— crates/contracts/ironclaw_host_api/src/audit.rs:63-68 | crates/contracts/ironclaw_host_api/src/audit.rs:94-99 | crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:537-542 | crates/kernel/ironclaw_authorization/src/lib.rs:839-844 | crates/kernel/ironclaw_processes/src/types.rs:326-331 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6 lines × 5) crates/extensions/packages/google-docs/wasm-src/src/lib.rs:68— crates/extensions/packages/google-docs/wasm-src/src/lib.rs:68-73 | crates/extensions/packages/google-drive/wasm-src/src/lib.rs:52-57 | crates/extensions/packages/google-sheets/wasm-src/src/lib.rs:58-63 | crates/extensions/packages/google-slides/wasm-src/src/lib.rs:67-72 | crates/extensions/packages/slack/wasm-src/src/lib.rs:60-65 — before extracting anything, compare `crates/extensions/packages/google-docs/wasm-src/src/lib.rs` and `crates/extensions/packages/google-drive/wasm-src/src/lib.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 5) crates/extensions/packages/google-docs/wasm-src/src/lib.rs:75— crates/extensions/packages/google-docs/wasm-src/src/lib.rs:75-80 | crates/extensions/packages/google-drive/wasm-src/src/lib.rs:59-67 | crates/extensions/packages/google-sheets/wasm-src/src/lib.rs:65-70 | crates/extensions/packages/google-slides/wasm-src/src/lib.rs:74-79 | crates/extensions/packages/slack/wasm-src/src/lib.rs:67-72 — before extracting anything, compare `crates/extensions/packages/google-docs/wasm-src/src/lib.rs` and `crates/extensions/packages/google-drive/wasm-src/src/lib.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 5) crates/domains/ironclaw_triggers/src/libsql.rs:469— crates/domains/ironclaw_triggers/src/libsql.rs:469-474 | crates/domains/ironclaw_triggers/src/libsql.rs:582-587 | crates/domains/ironclaw_triggers/src/libsql.rs:620-626 | crates/domains/ironclaw_triggers/src/libsql.rs:709-715 | crates/domains/ironclaw_triggers/src/libsql.rs:1668-1673 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
CapabilityStage::process (cyclomatic 80) crates/loop/ironclaw_agent_loop/src/executor/capabilities.rs:64— CapabilityStage::process has cyclomatic complexity 80 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
CapabilityStage::handle_capability_error (cyclomatic 24) crates/loop/ironclaw_agent_loop/src/executor/capability_dispatch.rs:468— CapabilityStage::handle_capability_error has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CapabilityStage::invoke_batch (cyclomatic 17) crates/loop/ironclaw_agent_loop/src/executor/capability_batch.rs:59— CapabilityStage::invoke_batch has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
GeminiOauthProvider::to_gemini_request (cyclomatic 59) crates/domains/ironclaw_llm/src/gemini_oauth.rs:1439— GeminiOauthProvider::to_gemini_request has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GeminiOauthProvider::aggregate_cloud_code_sse (cyclomatic 37) crates/domains/ironclaw_llm/src/gemini_oauth.rs:1765— GeminiOauthProvider::aggregate_cloud_code_sse has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GeminiOauthProvider::send_request (cyclomatic 17) crates/domains/ironclaw_llm/src/gemini_oauth.rs:1174— GeminiOauthProvider::send_request has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExtensionLifecycleManager::remove (cyclomatic 29) crates/extensions/ironclaw_extension_host/src/product_lifecycle.rs:1706— ExtensionLifecycleManager::remove has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ExtensionLifecycleManager::remove_locked (cyclomatic 24) crates/extensions/ironclaw_extension_host/src/product_lifecycle.rs:2258— ExtensionLifecycleManager::remove_locked has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExtensionLifecycleManager::install_registry_package (cyclomatic 21) crates/extensions/ironclaw_extension_host/src/product_lifecycle.rs:1160— ExtensionLifecycleManager::install_registry_package has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FilesystemSessionThreadService::try_write_new_message_transactionally (cyclomatic 18) crates/domains/ironclaw_threads/src/filesystem_service.rs:637— FilesystemSessionThreadService::try_write_new_message_transactionally has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FilesystemSessionThreadService::schedule_thread_index_projection_repair (cyclomatic 17) crates/domains/ironclaw_threads/src/filesystem_service/thread_index/projection_repair.rs:60— FilesystemSessionThreadService::schedule_thread_index_projection_repair has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FilesystemSessionThreadService::ensure_thread_index_query (cyclomatic 17) crates/domains/ironclaw_threads/src/filesystem_service/thread_index.rs:109— FilesystemSessionThreadService::ensure_thread_index_query has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Repeated repair: crates/contracts/ironclaw_loop_contracts/src/host/context.rs crates/contracts/ironclaw_loop_contracts/src/host/context.rs:168— crates/contracts/ironclaw_loop_contracts/src/host/context.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is LoopInputCursor::is_for_run at line 168), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(safety): redact model-bound secrets without rejecting turns (#7509)”; “fix(loop): compact context on window eviction (#7504)”; “fix(loop): retain accepted task across context eviction (#7503)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/contracts/ironclaw_loop_contracts/src/host/context.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/app/ironclaw_composition/src/filesystem_assembly.rs crates/app/ironclaw_composition/src/filesystem_assembly.rs:87— crates/app/ironclaw_composition/src/filesystem_assembly.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is ironclaw_composition::filesystem_assembly::build_filesystem at line 87), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(resources): stop libSQL write-lane starvation from cascading through the resource governor (#7714) (#7717)”; “fix(processes): lease expiry recovers safe runs instead of failing them; isolate the journal heartbeat pool (#7471)”; “fix(skills): one DB-backed tree for every skill mount, and make a skill's own commands runnable (closes #7168) (#7171)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/app/ironclaw_composition/src/filesystem_assembly.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/extensions/packages/telegram/src/linked/login.rs crates/extensions/packages/telegram/src/linked/login.rs:429— crates/extensions/packages/telegram/src/linked/login.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is TelegramDeviceLinkAdapter::submit_code at line 429), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(device-link): say "not configured by administrator" instead of blaming the user's account (#8073)”; “fix(extensions): tell the truth on cards and install results (QA #7660 + install guidance) (#7666)”; “fix(telegram): recognize the 2FA gate on migrated DCs and say where login codes arrive (#7658)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-12..2026-09-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-12 14:55:51 -04:00' --until='2026-09-10 14:55:51 -04:00' --full-history --no-merges -- crates/extensions/packages/telegram/src/linked/login.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
FilesystemAuthProductServices::sweep_all_accounts (cognitive 114) crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:678— FilesystemAuthProductServices::sweep_all_accounts has cognitive complexity 114 (threshold 15). Drivers by points: if/else 14 (65 pts), match/switch 8 (25 pts), loops 6 (24 pts) (nesting depth added 86). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilesystemAuthProductServices::cleanup_for_lifecycle (cognitive 53) crates/domains/ironclaw_auth/src/product_auth/durable/cleanup.rs:17— FilesystemAuthProductServices::cleanup_for_lifecycle has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (34 pts), match/switch 2 (7 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilesystemAuthProductServices::resolve_callback_account (cognitive 21) crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:822— FilesystemAuthProductServices::resolve_callback_account has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CapabilityStage::process (cognitive 106) crates/loop/ironclaw_agent_loop/src/executor/capabilities.rs:64— CapabilityStage::process has cognitive complexity 106 (threshold 15). Drivers by points: if/else 32 (48 pts), match/switch 20 (35 pts), loops 9 (12 pts), boolean chains 11 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CapabilityStage::handle_capability_error (cognitive 48) crates/loop/ironclaw_agent_loop/src/executor/capability_dispatch.rs:468— CapabilityStage::handle_capability_error has cognitive complexity 48 (threshold 15). Drivers by points: if/else 10 (31 pts), match/switch 5 (14 pts), boolean chains 2, loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CapabilityStage::invoke_batch (cognitive 18) crates/loop/ironclaw_agent_loop/src/executor/capability_batch.rs:59— CapabilityStage::invoke_batch has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 3 (5 pts), match/switch 2 (4 pts), loops 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extension_registry::v3::parse_v3 (cognitive 62) crates/extensions/ironclaw_extension_registry/src/v3.rs:254— ironclaw_extension_registry::v3::parse_v3 has cognitive complexity 62 (threshold 15). Drivers by points: if/else 29 (46 pts), boolean chains 7, match/switch 3 (5 pts), loops 4 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extension_registry::canonicalization::canonicalize_installation_rows (cognitive 23) crates/extensions/ironclaw_extension_registry/src/canonicalization.rs:19— ironclaw_extension_registry::canonicalization::canonicalize_installation_rows has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_extension_registry::v3::validate_channel_admin_configuration (cognitive 16) crates/extensions/ironclaw_extension_registry/src/v3.rs:852— ironclaw_extension_registry::v3::validate_channel_admin_configuration has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
google_docs_tool::api::extract_text_from_elements (cognitive 53) crates/extensions/packages/google-docs/wasm-src/src/api.rs:536— google_docs_tool::api::extract_text_from_elements has cognitive complexity 53 (threshold 15). Drivers by points: if/else 10 (38 pts), loops 4 (15 pts) (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
google_docs_tool::api::create_table_with_data (cognitive 26) crates/extensions/packages/google-docs/wasm-src/src/api.rs:865— google_docs_tool::api::create_table_with_data has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 7 (11 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
google_docs_tool::api::get_document (cognitive 21) crates/extensions/packages/google-docs/wasm-src/src/api.rs:248— google_docs_tool::api::get_document has cognitive complexity 21 (threshold 15). Drivers by points: loops 3 (12 pts), if/else 3 (9 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ironclaw_openai_compat::streaming::response_sse_stream (cognitive 49) crates/product/ironclaw_openai_compat/src/streaming.rs:200— ironclaw_openai_compat::streaming::response_sse_stream has cognitive complexity 49 (threshold 15). Drivers by points: match/switch 6 (23 pts), if/else 4 (17 pts), loops 3 (9 pts) (nesting depth added 36). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ironclaw_openai_compat::streaming::chat_sse_stream (cognitive 39) crates/product/ironclaw_openai_compat/src/streaming.rs:94— ironclaw_openai_compat::streaming::chat_sse_stream has cognitive complexity 39 (threshold 15). Drivers by points: match/switch 6 (23 pts), loops 3 (9 pts), if/else 2 (7 pts) (nesting depth added 28). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ironclaw_openai_compat::prepared_turn::agent_messages_from_chat (cognitive 22) crates/product/ironclaw_openai_compat/src/prepared_turn.rs:159— ironclaw_openai_compat::prepared_turn::agent_messages_from_chat has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), match/switch 3 (6 pts) (nesting depth added 12). Of this number, 16 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Reconciler::finish (cognitive 23) crates/extensions/packages/slack/src/reply_sink/mod.rs:747— Reconciler::finish has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (6 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Reconciler::resolve_pending (cognitive 21) crates/extensions/packages/slack/src/reply_sink/mod.rs:208— Reconciler::resolve_pending has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Reconciler::progress (cognitive 20) crates/extensions/packages/slack/src/reply_sink/mod.rs:382— Reconciler::progress has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 3 (8 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RebornIdentityStore::resolve_or_create (cognitive 18) crates/domains/ironclaw_identity/src/identity_store.rs:246— RebornIdentityStore::resolve_or_create has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RebornIdentityStore::delete_external_identities_for_user (cognitive 17) crates/domains/ironclaw_identity/src/identity_store/directory.rs:172— RebornIdentityStore::delete_external_identities_for_user has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (8 pts), match/switch 2 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RebornIdentityStore::list_users (cognitive 17) crates/domains/ironclaw_identity/src/identity_store/directory.rs:248— RebornIdentityStore::list_users has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Members sharing a duplicated core (8 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (8 members, 50+ identical tokens) crates/extensions/ironclaw_extension_registry/src/installations.rs:1976— crates/extensions/ironclaw_extension_registry/src/installations.rs:1976-2032 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2040-2108 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2116-2178 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2305-2350 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2399-2441 | crates/extensions/ironclaw_extension_registry/src/installations.rs:3191-3236 | crates/extensions/ironclaw_extension_registry/src/installations.rs:3434-3513 | crates/extensions/ironclaw_extension_registry/src/installations.rs:3598-3678 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
Members sharing a duplicated core (8 members, 50+ identical tokens) crates/extensions/packages/github/wasm-src/src/api/actions.rs:120— crates/extensions/packages/github/wasm-src/src/api/actions.rs:120-140 | crates/extensions/packages/github/wasm-src/src/api/actions.rs:171-192 | crates/extensions/packages/github/wasm-src/src/api/issues.rs:431-448 | crates/extensions/packages/github/wasm-src/src/api/pulls.rs:208-225 | crates/extensions/packages/github/wasm-src/src/api/pulls.rs:279-309 | crates/extensions/packages/github/wasm-src/src/api/pulls.rs:369-386 | crates/extensions/packages/github/wasm-src/src/api/repos.rs:143-164 | crates/extensions/packages/github/wasm-src/src/api/repos.rs:208-225 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
Members sharing a duplicated core (8 members, 50+ identical tokens) crates/kernel/ironclaw_host_runtime/src/memory_context.rs:238— crates/kernel/ironclaw_host_runtime/src/memory_context.rs:238-245 | crates/kernel/ironclaw_host_runtime/src/obligations/process_store.rs:444-455 | crates/kernel/ironclaw_host_runtime/src/obligations/process_store.rs:470-480 | crates/kernel/ironclaw_host_runtime/src/obligations/staged_handoffs.rs:292-304 | crates/kernel/ironclaw_host_runtime/src/obligations/staged_handoffs.rs:331-342 | crates/kernel/ironclaw_host_runtime/src/obligations/staged_handoffs.rs:429-440 | crates/kernel/ironclaw_host_runtime/src/post_edit_check.rs:195-204 | crates/lanes/ironclaw_mcp/src/client.rs:122-134 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
Duplicated block (27 lines × 2) crates/app/ironclaw_composition/src/llm_admin/openai_compat_serve.rs:797— crates/app/ironclaw_composition/src/llm_admin/openai_compat_serve.rs:797-823 | crates/app/ironclaw_composition/src/llm_admin/openai_compat_serve.rs:836-862 — 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.
Duplicated block (27 lines × 2) crates/extensions/packages/memory-native/src/backend.rs:473— crates/extensions/packages/memory-native/src/backend.rs:473-499 | crates/extensions/packages/memory-native/src/backend.rs:795-821 — 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.
Duplicated block (27 lines × 2) crates/loop/ironclaw_agent_loop/src/executor/capability_dispatch.rs:563— crates/loop/ironclaw_agent_loop/src/executor/capability_dispatch.rs:563-589 | crates/loop/ironclaw_agent_loop/src/executor/capability_dispatch.rs:669-695 — 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.
Duplicated block (20–24 lines × 2) crates/domains/ironclaw_llm/src/nearai_chat.rs:1033— crates/domains/ironclaw_llm/src/nearai_chat.rs:1033-1056 | crates/domains/ironclaw_llm/src/nearai_chat.rs:1153-1172 — 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.
Duplicated block (20–24 lines × 2) crates/domains/ironclaw_outbound/src/outbound_state_store.rs:1108— crates/domains/ironclaw_outbound/src/outbound_state_store.rs:1108-1131 | crates/domains/ironclaw_outbound/src/outbound_state_store.rs:1165-1184 — 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.
Duplicated block (20–24 lines × 2) crates/extensions/ironclaw_extension_host/src/resolver.rs:79— crates/extensions/ironclaw_extension_host/src/resolver.rs:79-102 | crates/kernel/ironclaw_capabilities/src/registry.rs:122-141 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (22 lines × 2) crates/domains/ironclaw_auth/src/fakes.rs:671— crates/domains/ironclaw_auth/src/fakes.rs:671-692 | crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:691-712 — before extracting anything, compare `crates/domains/ironclaw_auth/src/fakes.rs` and `crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (22 lines × 2) crates/domains/ironclaw_triggers/src/libsql.rs:1094— crates/domains/ironclaw_triggers/src/libsql.rs:1094-1115 | crates/domains/ironclaw_triggers/src/libsql.rs:1208-1229 — 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.
Duplicated block (22 lines × 2) crates/app/ironclaw_composition/src/factory/capability_host_tests/approval_gates.rs:758— crates/app/ironclaw_composition/src/factory/capability_host_tests/approval_gates.rs:758-779 | crates/app/ironclaw_composition/src/factory/capability_host_tests/approval_gates.rs:1104-1125 — 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.
Duplicated block (19–21 lines × 2) crates/domains/ironclaw_auth/src/fakes.rs:288— crates/domains/ironclaw_auth/src/fakes.rs:288-306 | crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:173-193 — before extracting anything, compare `crates/domains/ironclaw_auth/src/fakes.rs` and `crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (19–21 lines × 2) crates/domains/ironclaw_llm/src/reasoning.rs:601— crates/domains/ironclaw_llm/src/reasoning.rs:601-621 | crates/domains/ironclaw_llm/src/reasoning.rs:699-717 — 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.
Duplicated block (19–21 lines × 2) crates/domains/ironclaw_threads/src/tool_result_records.rs:339— crates/domains/ironclaw_threads/src/tool_result_records.rs:339-359 | crates/domains/ironclaw_threads/src/tool_result_records.rs:414-432 — 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.
Duplicated block (19–20 lines × 2) crates/extensions/ironclaw_extension_manager/src/extension_lifecycle_command.rs:94— crates/extensions/ironclaw_extension_manager/src/extension_lifecycle_command.rs:94-112 | crates/extensions/ironclaw_extension_manager/src/lifecycle_product_service.rs:458-477 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (19–20 lines × 2) tools/ironclaw_stress/src/main.rs:2003— tools/ironclaw_stress/src/main.rs:2003-2021 | tools/ironclaw_stress/src/main.rs:2197-2216 — 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.
Duplicated block (19–20 lines × 2) scripts/workflow_canary/telegram_setup.py:142— scripts/workflow_canary/telegram_setup.py:142-161 | scripts/workflow_canary/telegram_setup.py:171-189 — 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.
Duplicated block (17 lines × 3) crates/domains/ironclaw_triggers/src/worker/due_fire.rs:101— crates/domains/ironclaw_triggers/src/worker/due_fire.rs:101-117 | crates/domains/ironclaw_triggers/src/worker/due_fire.rs:127-143 | crates/domains/ironclaw_triggers/src/worker/due_fire.rs:153-169 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (17 lines × 3) crates/kernel/ironclaw_approvals/src/approval_store.rs:568— crates/kernel/ironclaw_approvals/src/approval_store.rs:568-584 | crates/kernel/ironclaw_capabilities/src/replay_payload.rs:287-303 | crates/kernel/ironclaw_processes/src/result_store.rs:212-228 — before extracting anything, compare `crates/kernel/ironclaw_approvals/src/approval_store.rs` and `crates/kernel/ironclaw_capabilities/src/replay_payload.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 3) tools/ironclaw_stress/src/analysis.rs:584— tools/ironclaw_stress/src/analysis.rs:584-600 | tools/ironclaw_stress/src/human.rs:938-954 | tools/ironclaw_stress/src/report.rs:49-65 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (15 lines × 3) crates/events/ironclaw_event_log/src/runtime_event.rs:589— crates/events/ironclaw_event_log/src/runtime_event.rs:589-603 | crates/events/ironclaw_event_log/src/runtime_event.rs:614-628 | crates/events/ironclaw_event_log/src/runtime_event.rs:665-679 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (15 lines × 3) crates/product/ironclaw_webui/src/webui_v2/handlers.rs:454— crates/product/ironclaw_webui/src/webui_v2/handlers.rs:454-468 | crates/product/ironclaw_webui/src/webui_v2/handlers.rs:515-529 | crates/product/ironclaw_webui/src/webui_v2/handlers.rs:547-561 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (15 lines × 3) crates/extensions/ironclaw_extension_support/src/web_access.rs:674— crates/extensions/ironclaw_extension_support/src/web_access.rs:674-688 | crates/extensions/ironclaw_extension_support/src/web_access.rs:743-757 | crates/extensions/ironclaw_extension_support/src/web_access.rs:790-804 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (14 lines × 3) crates/domains/ironclaw_triggers/src/postgres.rs:865— crates/domains/ironclaw_triggers/src/postgres.rs:865-878 | crates/domains/ironclaw_triggers/src/postgres.rs:941-954 | crates/domains/ironclaw_triggers/src/postgres.rs:1020-1033 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (14 lines × 3) crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:245— crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:245-258 | crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:308-321 | crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:400-413 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (14 lines × 3) crates/domains/ironclaw_threads/src/in_memory.rs:1200— crates/domains/ironclaw_threads/src/in_memory.rs:1200-1213 | crates/domains/ironclaw_threads/src/in_memory.rs:1310-1323 | crates/domains/ironclaw_threads/src/in_memory.rs:1383-1396 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12 lines × 3) crates/contracts/ironclaw_loop_contracts/src/instruction_bundle.rs:564— crates/contracts/ironclaw_loop_contracts/src/instruction_bundle.rs:564-575 | crates/contracts/ironclaw_loop_contracts/src/instruction_bundle.rs:617-628 | crates/contracts/ironclaw_loop_contracts/src/instruction_bundle.rs:682-693 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12 lines × 3) crates/domains/ironclaw_outbound/src/outbound_state_store.rs:1092— crates/domains/ironclaw_outbound/src/outbound_state_store.rs:1092-1103 | crates/domains/ironclaw_outbound/src/outbound_state_store.rs:1137-1148 | crates/domains/ironclaw_outbound/src/outbound_state_store.rs:1191-1202 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12 lines × 3) crates/extensions/packages/google-docs/wasm-src/src/api.rs:94— crates/extensions/packages/google-docs/wasm-src/src/api.rs:94-105 | crates/extensions/packages/google-sheets/wasm-src/src/api.rs:67-78 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:67-78 — before extracting anything, compare `crates/extensions/packages/google-docs/wasm-src/src/api.rs` and `crates/extensions/packages/google-sheets/wasm-src/src/api.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 4) crates/extensions/ironclaw_extension_registry/src/installations.rs:1979— crates/extensions/ironclaw_extension_registry/src/installations.rs:1979-1989 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2307-2317 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2401-2411 | crates/extensions/ironclaw_extension_registry/src/installations.rs:3194-3204 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11 lines × 4) tools/ironclaw_stress/src/compare.rs:502— tools/ironclaw_stress/src/compare.rs:502-512 | tools/ironclaw_stress/src/human.rs:1044-1054 | tools/ironclaw_stress/src/suite.rs:648-658 | tools/ironclaw_stress/src/sweep.rs:614-624 — before extracting anything, compare `tools/ironclaw_stress/src/suite.rs` and `tools/ironclaw_stress/src/sweep.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 4) crates/extensions/packages/google-docs/wasm-src/src/api.rs:96— crates/extensions/packages/google-docs/wasm-src/src/api.rs:96-106 | crates/extensions/packages/google-drive/wasm-src/src/api.rs:72-82 | crates/extensions/packages/google-sheets/wasm-src/src/api.rs:69-79 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:69-79 — before extracting anything, compare `crates/extensions/packages/google-docs/wasm-src/src/api.rs` and `crates/extensions/packages/google-drive/wasm-src/src/api.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 4) crates/extensions/ironclaw_extension_manager/src/admin_configuration.rs:146— crates/extensions/ironclaw_extension_manager/src/admin_configuration.rs:146-155 | crates/product/ironclaw_assistant/src/reborn_services.rs:1547-1556 | crates/product/ironclaw_assistant/src/reborn_services.rs:6949-6958 | crates/product/ironclaw_assistant/src/suggestions.rs:412-421 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (10 lines × 4) crates/app/ironclaw_composition/src/product_surface.rs:591— crates/app/ironclaw_composition/src/product_surface.rs:591-600 | crates/product/ironclaw_assistant/src/automation_product_service.rs:688-697 | crates/product/ironclaw_assistant/src/fakes.rs:30-39 | crates/product/ironclaw_assistant/src/reborn_services/outbound_preferences.rs:150-159 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
Duplicated block (10 lines × 4) scripts/workflow_canary/scenarios/bug_logger.py:48— scripts/workflow_canary/scenarios/bug_logger.py:48-57 | scripts/workflow_canary/scenarios/calendar_prep.py:49-69 | scripts/workflow_canary/scenarios/crm_tracker.py:55-84 | scripts/workflow_canary/scenarios/crm_tracker.py:88-97 — before extracting anything, compare `scripts/workflow_canary/scenarios/bug_logger.py` and `scripts/workflow_canary/scenarios/calendar_prep.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 4) crates/loop/ironclaw_turn_runner/src/planned_driver_factory.rs:169— crates/loop/ironclaw_turn_runner/src/planned_driver_factory.rs:169-176 | crates/loop/ironclaw_turn_runner/src/planned_driver_factory.rs:187-194 | crates/loop/ironclaw_turn_runner/src/planned_driver_factory.rs:205-212 | crates/loop/ironclaw_turn_runner/src/planned_driver_factory.rs:223-230 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 4) tools/ironclaw_stress/src/child_io.rs:41— tools/ironclaw_stress/src/child_io.rs:41-48 | tools/ironclaw_stress/src/main.rs:2609-2616 | tools/ironclaw_stress/src/progress.rs:142-149 | tools/ironclaw_stress/src/trace.rs:291-298 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
Duplicated block (8 lines × 4) crates/domains/ironclaw_llm/src/lib.rs:595— crates/domains/ironclaw_llm/src/lib.rs:595-603 | crates/domains/ironclaw_llm/src/lib.rs:673-680 | crates/domains/ironclaw_llm/src/lib.rs:770-777 | crates/domains/ironclaw_llm/src/lib.rs:840-847 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7–8 lines × 3) crates/app/ironclaw_cli/src/commands/traces/mod.rs:2027— crates/app/ironclaw_cli/src/commands/traces/mod.rs:2027-2033 | crates/domains/ironclaw_trace_commons/src/contribution/queue.rs:1002-1009 | crates/domains/ironclaw_trace_commons/src/contribution/queue.rs:1029-1036 — before extracting anything, compare `crates/app/ironclaw_cli/src/commands/traces/mod.rs` and `crates/domains/ironclaw_trace_commons/src/contribution/queue.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7–8 lines × 3) crates/kernel/ironclaw_approvals/src/capability_permission.rs:292— crates/kernel/ironclaw_approvals/src/capability_permission.rs:292-298 | crates/kernel/ironclaw_approvals/src/policy.rs:319-325 | crates/kernel/ironclaw_processes/src/journal_store/migration.rs:167-174 — before extracting anything, compare `crates/kernel/ironclaw_approvals/src/capability_permission.rs` and `crates/kernel/ironclaw_approvals/src/policy.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7–8 lines × 3) REDACTED:1224— REDACTED:1224-1231 | REDACTED:1251-1257 | REDACTED:886-893 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 318 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7–8 lines × 2) crates/contracts/ironclaw_loop_contracts/src/content_digest.rs:156— crates/contracts/ironclaw_loop_contracts/src/content_digest.rs:156-163 | crates/contracts/ironclaw_loop_contracts/src/content_digest.rs:165-171 — 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.
Duplicated block (7–8 lines × 2) crates/events/ironclaw_event_store/src/lib.rs:600— crates/events/ironclaw_event_store/src/lib.rs:600-606 | crates/events/ironclaw_event_store/src/lib.rs:661-668 — 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.
Duplicated block (7–8 lines × 2) crates/extensions/packages/telegram/src/linked/ops/people.rs:123— crates/extensions/packages/telegram/src/linked/ops/people.rs:123-129 | crates/extensions/packages/telegram/src/linked/ops/reads.rs:57-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 4) crates/extensions/packages/telegram/src/linked/ops/people.rs:124— crates/extensions/packages/telegram/src/linked/ops/people.rs:124-129 | crates/extensions/packages/telegram/src/linked/ops/reads.rs:59-64 | crates/extensions/packages/telegram/src/linked/ops/reads.rs:142-147 | crates/extensions/packages/telegram/src/linked/ops/reads.rs:245-250 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6 lines × 4) crates/events/ironclaw_event_projections/src/runtime_checkpoint_cache.rs:97— crates/events/ironclaw_event_projections/src/runtime_checkpoint_cache.rs:97-102 | crates/extensions/ironclaw_extension_host/src/device_link_driver.rs:934-939 | crates/extensions/ironclaw_extension_host/src/linked_session_custody.rs:458-463 | crates/extensions/ironclaw_extension_support/src/coding/state.rs:117-124 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
Duplicated block (6 lines × 4) crates/extensions/packages/google-drive/wasm-src/src/api.rs:205— crates/extensions/packages/google-drive/wasm-src/src/api.rs:205-210 | crates/extensions/packages/google-drive/wasm-src/src/api.rs:579-586 | crates/extensions/packages/google-drive/wasm-src/src/api.rs:622-627 | crates/extensions/packages/google-sheets/wasm-src/src/api.rs:265-272 — before extracting anything, compare `crates/extensions/packages/google-drive/wasm-src/src/api.rs` and `crates/extensions/packages/google-sheets/wasm-src/src/api.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/components/notification-center.tsx:18— crates/product/ironclaw_webui/frontend/src/components/notification-center.tsx:18 · crates/product/ironclaw_webui/frontend/src/components/notification-panel.tsx:138 — 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.
Duplicated block (15 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useSSE.ts:65— crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useSSE.ts:65 · crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/useInspector.ts:77 — 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.
Duplicated block (15 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/settings/components/inference-tab.tsx:175— crates/product/ironclaw_webui/frontend/src/pages/settings/components/inference-tab.tsx:175 · crates/product/ironclaw_webui/frontend/src/pages/settings/components/networking-tab.tsx:25 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication· Duplicated block with local edits (14 matched lines × 2 locations) · ×3
Duplicated block with local edits (14 matched lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChannelOnboarding.ts:299— crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChannelOnboarding.ts:299 · crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChannelOnboarding.ts:316 — the two spans are one implementation copied and then locally edited — 69 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.
Duplicated block with local edits (14 matched lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useConnectLinkLanding.ts:33— crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useConnectLinkLanding.ts:33 · crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useSetupLanding.ts:42 — the two spans are one implementation copied and then locally edited — 98 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.
Duplicated block with local edits (14 matched lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/settings/hooks/useProviderDialogForm.ts:81— crates/product/ironclaw_webui/frontend/src/pages/settings/hooks/useProviderDialogForm.ts:81 · crates/product/ironclaw_webui/frontend/src/pages/settings/hooks/useProviderDialogForm.ts:97 — the two spans are one implementation copied and then locally edited — 99 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.
Duplicated block (13 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/app/app.tsx:126— crates/product/ironclaw_webui/frontend/src/app/app.tsx:126 · crates/product/ironclaw_webui/frontend/src/app/app.tsx:154 — 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.
Duplicated block (13 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/lib/api.ts:950— crates/product/ironclaw_webui/frontend/src/lib/api.ts:950 · crates/product/ironclaw_webui/frontend/src/pages/chat/lib/attachments.ts:107 — 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.
Duplicated block (13 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/workspace/lib/workspace-api.ts:264— crates/product/ironclaw_webui/frontend/src/pages/workspace/lib/workspace-api.ts:264 · crates/product/ironclaw_webui/frontend/src/pages/workspace/lib/workspace-api.ts:278 — 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.
R10 · Code Duplication· Duplicated block with local edits (11 matched lines × 2 locations) · ×3
Duplicated block with local edits (11 matched lines × 2 locations) crates/product/ironclaw_webui/frontend/src/components/link-payload-panel.tsx:131— crates/product/ironclaw_webui/frontend/src/components/link-payload-panel.tsx:131 · crates/product/ironclaw_webui/frontend/src/pages/automations/components/automations-empty-state.tsx:24 — the two spans are one implementation copied and then locally edited — 72 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.
Duplicated block with local edits (11 matched lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/chat/components/auth-generic-card.tsx:23— crates/product/ironclaw_webui/frontend/src/pages/chat/components/auth-generic-card.tsx:23 · crates/product/ironclaw_webui/frontend/src/pages/chat/components/auth-token-card.tsx:75 — the two spans are one implementation copied and then locally edited — 57 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.
Duplicated block with local edits (11 matched lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useSSE.ts:270— crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useSSE.ts:270 · crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useSSE.ts:393 — the two spans are one implementation copied and then locally edited — 58 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.
ironclaw_composition::runtime::build_runtime_with_resource_governor (cyclomatic 54) crates/app/ironclaw_composition/src/runtime.rs:3111— ironclaw_composition::runtime::build_runtime_with_resource_governor has cyclomatic complexity 54 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ironclaw_composition::factory::production_backend_assembly::build_backend_production (cyclomatic 20) crates/app/ironclaw_composition/src/factory/production_backend_assembly.rs:331— ironclaw_composition::factory::production_backend_assembly::build_backend_production has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
RunDeliveryObserver::deliver_final_reply (cyclomatic 46) crates/product/ironclaw_assistant/src/run_delivery/observer.rs:445— RunDeliveryObserver::deliver_final_reply has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RunDeliveryObserver::notification_for_actionable_state (cyclomatic 16) crates/product/ironclaw_assistant/src/run_delivery/observer.rs:1127— RunDeliveryObserver::notification_for_actionable_state has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
FilesystemAuthProductServices::sweep_all_accounts (cyclomatic 34) crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:678— FilesystemAuthProductServices::sweep_all_accounts has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FilesystemAuthProductServices::cleanup_for_lifecycle (cyclomatic 26) crates/domains/ironclaw_auth/src/product_auth/durable/cleanup.rs:17— FilesystemAuthProductServices::cleanup_for_lifecycle has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_processes::journal_store::rows::load (cyclomatic 34) crates/kernel/ironclaw_processes/src/journal_store/rows.rs:301— ironclaw_processes::journal_store::rows::load has cyclomatic complexity 34 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ironclaw_processes::journal_store::flusher::commit_pending (cyclomatic 21) crates/kernel/ironclaw_processes/src/journal_store/flusher.rs:383— ironclaw_processes::journal_store::flusher::commit_pending has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ironclaw_trace_commons::contribution::maintenance::trace_queue_telemetry_failure_kind (cyclomatic 28) crates/domains/ironclaw_trace_commons/src/contribution/maintenance.rs:472— ironclaw_trace_commons::contribution::maintenance::trace_queue_telemetry_failure_kind has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ironclaw_trace_commons::contribution::maintenance::compact_trace_queue_for_scope_unlocked (cyclomatic 17) crates/domains/ironclaw_trace_commons/src/contribution/maintenance.rs:23— ironclaw_trace_commons::contribution::maintenance::compact_trace_queue_for_scope_unlocked has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ThreadBackedLoopModelPort::resolve_model_messages (cyclomatic 25) crates/loop/ironclaw_loop_host/src/lib.rs:2011— ThreadBackedLoopModelPort::resolve_model_messages has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ThreadBackedLoopModelPort::stream_model (cyclomatic 17) crates/loop/ironclaw_loop_host/src/lib.rs:1714— ThreadBackedLoopModelPort::stream_model has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ironclaw_webui::webui_v2::handlers::build_sse_stream (cyclomatic 24) crates/product/ironclaw_webui/src/webui_v2/handlers.rs:1584— ironclaw_webui::webui_v2::handlers::build_sse_stream has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_webui::webui_v2::handlers::ws_drain_loop (cyclomatic 23) crates/product/ironclaw_webui/src/webui_v2/handlers.rs:4644— ironclaw_webui::webui_v2::handlers::ws_drain_loop has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw::runtime::trigger_poller::trigger_poller_settings (cyclomatic 20) crates/app/ironclaw_cli/src/runtime/trigger_poller.rs:49— ironclaw::runtime::trigger_poller::trigger_poller_settings has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw::commands::traces::show_queue_status (cyclomatic 16) crates/app/ironclaw_cli/src/commands/traces/mod.rs:805— ironclaw::commands::traces::show_queue_status has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ironclaw_openai_compat::streaming::response_sse_stream (cyclomatic 19) crates/product/ironclaw_openai_compat/src/streaming.rs:200— ironclaw_openai_compat::streaming::response_sse_stream has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ironclaw_openai_compat::streaming::chat_sse_stream (cyclomatic 16) crates/product/ironclaw_openai_compat/src/streaming.rs:94— ironclaw_openai_compat::streaming::chat_sse_stream has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
BlockedAuthResumeFanout::reconcile_stale_auth_notifications (cyclomatic 17) crates/product/ironclaw_assistant/src/blocked_auth_resume.rs:88— BlockedAuthResumeFanout::reconcile_stale_auth_notifications has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BlockedAuthResumeFanout::fan_out (cyclomatic 17) crates/product/ironclaw_assistant/src/blocked_auth_resume.rs:197— BlockedAuthResumeFanout::fan_out has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_safety::model_input_redaction::redact_model_input_url (cyclomatic 17) crates/substrates/ironclaw_safety/src/model_input_redaction.rs:68— ironclaw_safety::model_input_redaction::redact_model_input_url has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_safety::display_redaction::sanitize_display_text (cyclomatic 16) crates/substrates/ironclaw_safety/src/display_redaction.rs:52— ironclaw_safety::display_redaction::sanitize_display_text has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NearAiChatProvider::send_streaming_request_inner (cognitive 69) crates/domains/ironclaw_llm/src/nearai_chat.rs:573— NearAiChatProvider::send_streaming_request_inner has cognitive complexity 69 (threshold 15). Drivers by points: if/else 20 (57 pts), loops 4 (7 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NearAiChatProvider::send_request_inner (cognitive 17) crates/domains/ironclaw_llm/src/nearai_chat.rs:463— NearAiChatProvider::send_request_inner has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChannelConfigService::save (cognitive 60) crates/extensions/ironclaw_extension_host/src/channel_config.rs:231— ChannelConfigService::save has cognitive complexity 60 (threshold 15). Drivers by points: if/else 17 (47 pts), loops 4 (9 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ChannelConfigService::credential_handle_value (cognitive 19) crates/extensions/ironclaw_extension_host/src/channel_config.rs:462— ChannelConfigService::credential_handle_value has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CredentialManager::perform_oauth_login (cognitive 51) crates/domains/ironclaw_llm/src/gemini_oauth.rs:574— CredentialManager::perform_oauth_login has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (32 pts), match/switch 5 (14 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CredentialManager::get_valid_credential (cognitive 16) crates/domains/ironclaw_llm/src/gemini_oauth.rs:390— CredentialManager::get_valid_credential has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2, boolean chains 1 (nesting depth added 7). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ironclaw_sandbox::sandbox_process::user_container::sweep_idle_user_containers (cognitive 49) crates/lanes/ironclaw_sandbox/src/sandbox_process/user_container.rs:596— ironclaw_sandbox::sandbox_process::user_container::sweep_idle_user_containers has cognitive complexity 49 (threshold 15). Drivers by points: if/else 14 (39 pts), boolean chains 5, match/switch 2 (4 pts), loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_sandbox::sandbox_process::user_container::ensure_user_container (cognitive 18) crates/lanes/ironclaw_sandbox/src/sandbox_process/user_container.rs:139— ironclaw_sandbox::sandbox_process::user_container::ensure_user_container has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilesystemInboundBatchStore::stage (cognitive 47) crates/extensions/ironclaw_extension_host/src/inbound_batches.rs:733— FilesystemInboundBatchStore::stage has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (39 pts), match/switch 2 (5 pts), boolean chains 3 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
FilesystemInboundBatchStore::scan_live_batches (cognitive 16) crates/extensions/ironclaw_extension_host/src/inbound_batches.rs:630— FilesystemInboundBatchStore::scan_live_batches has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ThreadBackedLoopModelPort::resolve_model_messages (cognitive 43) crates/loop/ironclaw_loop_host/src/lib.rs:2011— ThreadBackedLoopModelPort::resolve_model_messages has cognitive complexity 43 (threshold 15). Drivers by points: if/else 20 (37 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ThreadBackedLoopModelPort::stream_model (cognitive 30) crates/loop/ironclaw_loop_host/src/lib.rs:1714— ThreadBackedLoopModelPort::stream_model has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (19 pts), match/switch 6 (11 pts) (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ProcessJournalStore::initialize_materialized (cognitive 41) crates/kernel/ironclaw_processes/src/journal_store.rs:528— ProcessJournalStore::initialize_materialized has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (24 pts), match/switch 4 (9 pts), loops 3 (8 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProcessJournalStore::replay_durable_observer_once (cognitive 26) crates/kernel/ironclaw_processes/src/journal_store/observer.rs:213— ProcessJournalStore::replay_durable_observer_once has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BlockedAuthResumeFanout::reconcile_stale_auth_notifications (cognitive 32) crates/product/ironclaw_assistant/src/blocked_auth_resume.rs:88— BlockedAuthResumeFanout::reconcile_stale_auth_notifications has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 3 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BlockedAuthResumeFanout::fan_out (cognitive 31) crates/product/ironclaw_assistant/src/blocked_auth_resume.rs:197— BlockedAuthResumeFanout::fan_out has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (22 pts), match/switch 2 (6 pts), boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_safety::display_redaction::sanitize_display_text (cognitive 29) crates/substrates/ironclaw_safety/src/display_redaction.rs:52— ironclaw_safety::display_redaction::sanitize_display_text has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 5, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_safety::model_input_redaction::redact_model_input_url (cognitive 26) crates/substrates/ironclaw_safety/src/model_input_redaction.rs:68— ironclaw_safety::model_input_redaction::redact_model_input_url has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_event_store::coalescing_sink::drain_loop (cognitive 27) crates/events/ironclaw_event_store/src/coalescing_sink.rs:211— ironclaw_event_store::coalescing_sink::drain_loop has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 4 (12 pts), if/else 4 (8 pts), loops 3 (7 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_event_store::stream_read_after_with (cognitive 20) crates/events/ironclaw_event_store/src/lib.rs:1449— ironclaw_event_store::stream_read_after_with has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 2, boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InMemoryBackend::query_ordered (cognitive 25) crates/substrates/ironclaw_filesystem/src/in_memory.rs:424— InMemoryBackend::query_ordered has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InMemoryBackend::list_dir_page (cognitive 17) crates/substrates/ironclaw_filesystem/src/in_memory.rs:231— InMemoryBackend::list_dir_page has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilesystemDurableEventLog::read_after_cursor (cognitive 24) crates/events/ironclaw_event_store/src/durable_log.rs:196— FilesystemDurableEventLog::read_after_cursor has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (FilesystemDurableAuditLog::read_after_cursor) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
FilesystemDurableEventLog::append_batch (cognitive 22) crates/events/ironclaw_event_store/src/durable_log.rs:104— FilesystemDurableEventLog::append_batch has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (12 pts), match/switch 4 (10 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ProcessJournalMaterializedState::apply_submit (cognitive 24) crates/kernel/ironclaw_processes/src/journal_store/state.rs:294— ProcessJournalMaterializedState::apply_submit has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProcessJournalMaterializedState::apply_submit_at_edge (cognitive 21) crates/kernel/ironclaw_processes/src/journal_store/state.rs:490— ProcessJournalMaterializedState::apply_submit_at_edge has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_auth::engine::keepalive::sweep_once (cognitive 23) crates/domains/ironclaw_auth/src/engine/keepalive.rs:294— ironclaw_auth::engine::keepalive::sweep_once has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 3 (6 pts), loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_auth::engine::exchange::extract_token_response (cognitive 16) crates/domains/ironclaw_auth/src/engine/exchange.rs:416— ironclaw_auth::engine::exchange::extract_token_response has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ironclaw_memory_native::service::tree_for_paths (cognitive 22) crates/extensions/packages/memory-native/src/service.rs:940— ironclaw_memory_native::service::tree_for_paths has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_memory_native::service::split_curated_text (cognitive 18) crates/extensions/packages/memory-native/src/service.rs:1094— ironclaw_memory_native::service::split_curated_text has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_mcp::client::project_content_block (cognitive 20) crates/lanes/ironclaw_mcp/src/client.rs:741— ironclaw_mcp::client::project_content_block has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (3 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ironclaw_mcp::jsonrpc::parse_mcp_sse_response (cognitive 16) crates/lanes/ironclaw_mcp/src/jsonrpc.rs:241— ironclaw_mcp::jsonrpc::parse_mcp_sse_response has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_operator::operator_logs::is_sensitive_log_path_candidate (cognitive 20) crates/product/ironclaw_operator/src/operator_logs.rs:741— ironclaw_operator::operator_logs::is_sensitive_log_path_candidate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 7, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_operator::llm_admin::llm_config_service::validated_model_policy (cognitive 16) crates/product/ironclaw_operator/src/llm_admin/llm_config_service.rs:1529— ironclaw_operator::llm_admin::llm_config_service::validated_model_policy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_turn_runner::trace_capture::conversation_messages_from_records (cognitive 19) crates/loop/ironclaw_turn_runner/src/trace_capture.rs:226— ironclaw_turn_runner::trace_capture::conversation_messages_from_records has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_turn_runner::runtime::build_default_planned_runtime_inner (cognitive 18) crates/loop/ironclaw_turn_runner/src/runtime.rs:705— ironclaw_turn_runner::runtime::build_default_planned_runtime_inner has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RunOutcomeProcessCommitObserver::observe_process_commit (cognitive 19) crates/product/ironclaw_assistant/src/run_outcome_observer.rs:592— RunOutcomeProcessCommitObserver::observe_process_commit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RunOutcomeProcessCommitObserver::resolve_open_run_notifications (cognitive 18) crates/product/ironclaw_assistant/src/run_outcome_observer.rs:308— RunOutcomeProcessCommitObserver::resolve_open_run_notifications has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 2 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
github_tool::api::pulls::validate_review_comments (cognitive 18) crates/extensions/packages/github/wasm-src/src/api/pulls.rs:311— github_tool::api::pulls::validate_review_comments has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
github_tool::api::issues::list_issue_only_page (cognitive 17) crates/extensions/packages/github/wasm-src/src/api/issues.rs:74— github_tool::api::issues::list_issue_only_page has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RebornServices::list_automation_threads_needing_approval (cognitive 18) crates/product/ironclaw_assistant/src/reborn_services.rs:5896— RebornServices::list_automation_threads_needing_approval has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RebornServices::automation_approval_thread_candidates (cognitive 16) crates/product/ironclaw_assistant/src/reborn_services.rs:6064— RebornServices::automation_approval_thread_candidates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InMemoryPredicateStateBackend::record_invocation (cognitive 17) crates/loop/ironclaw_hooks/src/predicate_state.rs:587— InMemoryPredicateStateBackend::record_invocation has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (InMemoryPredicateStateBackend::record_value) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
InMemoryPredicateStateBackend::record_value (cognitive 17) crates/loop/ironclaw_hooks/src/predicate_state.rs:684— InMemoryPredicateStateBackend::record_value has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (InMemoryPredicateStateBackend::record_invocation) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Change-coupling hub: error.rs → first_party.rs, lib.rs, runtime_adapters.rs crates/kernel/ironclaw_capabilities/src/error.rs— `crates/kernel/ironclaw_capabilities/src/error.rs` changes together with 3 other files — `crates/kernel/ironclaw_host_runtime/src/first_party.rs`, `crates/kernel/ironclaw_host_runtime/src/lib.rs`, `crates/kernel/ironclaw_host_runtime/src/services/runtime_adapters.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Change-coupling hub: lib.rs → init.rs, config_file.rs, fakes.rs crates/app/ironclaw_composition/src/lib.rs— `crates/app/ironclaw_composition/src/lib.rs` changes together with 3 other files — `crates/app/ironclaw_cli/src/commands/config/init.rs`, `crates/app/ironclaw_config/src/config_file.rs`, `crates/domains/ironclaw_auth/src/fakes.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Near-duplicate member pair (35 shared lines) crates/app/ironclaw_cli/src/commands/traces/mod.rs:1445— crates/app/ironclaw_cli/src/commands/traces/mod.rs:1445-1510 | crates/domains/ironclaw_trace_commons/src/contribution/submission.rs:665-762 — These two members are variants of one another: 35 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (35 shared lines) tools/ironclaw_stress/src/main.rs:2246— tools/ironclaw_stress/src/main.rs:2246-2302 | tools/ironclaw_stress/src/process_pressure.rs:31-79 — These two members are variants of one another: 35 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×2
Edited copy of a member (14 corresponding lines) REDACTED:527— REDACTED:527-588 | REDACTED:1302-1341 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) crates/extensions/ironclaw_extension_support/src/web_access.rs:512— crates/extensions/ironclaw_extension_support/src/web_access.rs:512-530 | crates/lanes/ironclaw_mcp/src/jsonrpc.rs:204-219 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (6 members, 50+ identical tokens) crates/extensions/ironclaw_extension_registry/src/installations.rs:1934— crates/extensions/ironclaw_extension_registry/src/installations.rs:1934-1969 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2243-2298 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2356-2392 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2447-2484 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2493-2525 | crates/extensions/ironclaw_extension_registry/src/installations.rs:3152-3184 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) crates/kernel/ironclaw_turns/src/host_managed_ports/prompt.rs:33— crates/kernel/ironclaw_turns/src/host_managed_ports/prompt.rs:33-49 | crates/loop/ironclaw_agent_loop/src/executor/latency.rs:22-44 | crates/loop/ironclaw_agent_loop/src/executor/latency.rs:52-75 | crates/loop/ironclaw_loop_host/src/lib.rs:253-270 | crates/loop/ironclaw_turn_runner/src/loop_driver_host.rs:82-96 | crates/loop/ironclaw_turn_runner/src/loop_driver_host.rs:103-120 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Duplicated block (33 lines × 2) crates/extensions/ironclaw_extension_host/src/channel_identity_store.rs:441— crates/extensions/ironclaw_extension_host/src/channel_identity_store.rs:441-473 | crates/extensions/ironclaw_extension_host/src/channel_identity_store.rs:524-556 — 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.
Duplicated block (33 lines × 2) REDACTED:2112— REDACTED:2112-2144 | REDACTED:2269-2301 — 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.
Duplicated block (31 lines × 2) crates/domains/ironclaw_llm/src/rig_adapter.rs:1542— crates/domains/ironclaw_llm/src/rig_adapter.rs:1542-1572 | crates/domains/ironclaw_llm/src/rig_adapter.rs:1652-1682 — 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.
Duplicated block (31 lines × 2) crates/events/ironclaw_event_log/src/runtime_event.rs:286— crates/events/ironclaw_event_log/src/runtime_event.rs:286-316 | crates/events/ironclaw_event_log/src/runtime_event.rs:321-351 — 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.
Duplicated block (28 lines × 2) crates/domains/ironclaw_llm/src/lib.rs:358— crates/domains/ironclaw_llm/src/lib.rs:358-385 | crates/domains/ironclaw_llm/src/lib.rs:725-752 — 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.
Duplicated block (28 lines × 2) crates/product/ironclaw_openai_compat/src/chat_workflow.rs:762— crates/product/ironclaw_openai_compat/src/chat_workflow.rs:762-789 | crates/product/ironclaw_openai_compat/src/responses_workflow.rs:1248-1275 — before extracting anything, compare `crates/product/ironclaw_openai_compat/src/chat_workflow.rs` and `crates/product/ironclaw_openai_compat/src/responses_workflow.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (26 lines × 2) crates/contracts/ironclaw_product_contracts/src/product_wire.rs:943— crates/contracts/ironclaw_product_contracts/src/product_wire.rs:943-968 | crates/domains/ironclaw_outbound/src/delivery_targets.rs:457-482 — before extracting anything, compare `crates/contracts/ironclaw_product_contracts/src/product_wire.rs` and `crates/domains/ironclaw_outbound/src/delivery_targets.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (26 lines × 2) crates/domains/ironclaw_llm/src/rig_adapter.rs:1391— crates/domains/ironclaw_llm/src/rig_adapter.rs:1391-1416 | crates/domains/ironclaw_llm/src/rig_adapter.rs:1471-1496 — 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.
Duplicated block (24 lines × 2) crates/domains/ironclaw_conversations/src/memory.rs:455— crates/domains/ironclaw_conversations/src/memory.rs:455-478 | crates/domains/ironclaw_conversations/src/memory.rs:907-930 — 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.
Duplicated block (24 lines × 2) crates/kernel/ironclaw_host_runtime/src/obligations/handler.rs:1167— crates/kernel/ironclaw_host_runtime/src/obligations/handler.rs:1167-1190 | crates/kernel/ironclaw_host_runtime/src/obligations/handler.rs:1204-1227 — 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.
Duplicated block (20–21 lines × 2) crates/kernel/ironclaw_host_runtime/src/first_party_tools/trace_commons.rs:809— crates/kernel/ironclaw_host_runtime/src/first_party_tools/trace_commons.rs:809-828 | crates/kernel/ironclaw_host_runtime/src/first_party_tools/trace_commons.rs:1131-1151 — 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.
Duplicated block (20–21 lines × 2) scripts/workflow_canary/scenarios/calendar_prep.py:112— scripts/workflow_canary/scenarios/calendar_prep.py:112-132 | scripts/workflow_canary/scenarios/hn_monitor.py:105-124 — before extracting anything, compare `scripts/workflow_canary/scenarios/calendar_prep.py` and `scripts/workflow_canary/scenarios/hn_monitor.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/workflow_canary/scenarios/calendar_prep.py:112` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (20 lines × 4) crates/extensions/packages/memory-native/src/backend.rs:507— crates/extensions/packages/memory-native/src/backend.rs:507-526 | crates/extensions/packages/memory-native/src/backend.rs:623-642 | crates/extensions/packages/memory-native/src/backend.rs:726-745 | crates/extensions/packages/memory-native/src/backend.rs:831-850 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (20 lines × 4) crates/loop/ironclaw_agent_loop/src/executor/capabilities.rs:142— crates/loop/ironclaw_agent_loop/src/executor/capabilities.rs:142-161 | crates/loop/ironclaw_agent_loop/src/executor/capabilities.rs:308-327 | crates/loop/ironclaw_agent_loop/src/executor/capabilities.rs:442-461 | crates/loop/ironclaw_agent_loop/src/executor/capabilities.rs:499-518 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (16–20 lines × 2) crates/domains/ironclaw_llm/src/nearai_chat.rs:892— crates/domains/ironclaw_llm/src/nearai_chat.rs:892-911 | crates/domains/ironclaw_llm/src/nearai_chat.rs:975-990 — 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.
Duplicated block (16–20 lines × 2) scripts/reborn_webui_v2_live_qa/run_live_qa.py:2794— scripts/reborn_webui_v2_live_qa/run_live_qa.py:2794-2809 | scripts/reborn_webui_v2_live_qa/run_live_qa.py:2971-2990 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17–18 lines × 2) crates/product/ironclaw_webui/src/webui_v2/handlers.rs:4720— crates/product/ironclaw_webui/src/webui_v2/handlers.rs:4720-4736 | crates/product/ironclaw_webui/src/webui_v2/handlers.rs:4812-4829 — 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.
Duplicated block (17–18 lines × 2) scripts/ci/reborn_pr_test_plan.py:1286— scripts/ci/reborn_pr_test_plan.py:1286-1303 | scripts/ci/reborn_pr_test_plan.py:1421-1437 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15–17 lines × 2) crates/domains/ironclaw_llm/src/gemini_oauth.rs:494— crates/domains/ironclaw_llm/src/gemini_oauth.rs:494-508 | crates/domains/ironclaw_llm/src/gemini_oauth.rs:675-691 — 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.
Duplicated block (15–17 lines × 2) crates/substrates/ironclaw_documents/src/docx.rs:437— crates/substrates/ironclaw_documents/src/docx.rs:437-453 | crates/substrates/ironclaw_documents/src/xlsx.rs:391-405 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (13–15 lines × 2) crates/extensions/packages/telegram/src/channel.rs:468— crates/extensions/packages/telegram/src/channel.rs:468-482 | crates/extensions/packages/telegram/src/channel.rs:553-565 — 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.
Duplicated block (13–15 lines × 2) crates/loop/ironclaw_agent_loop/src/executor/prompt.rs:308— crates/loop/ironclaw_agent_loop/src/executor/prompt.rs:308-322 | crates/loop/ironclaw_agent_loop/src/executor/prompt.rs:334-346 — 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.
Duplicated block (11 lines × 5) crates/extensions/packages/google-docs/wasm-src/src/api.rs:25— crates/extensions/packages/google-docs/wasm-src/src/api.rs:25-35 | crates/extensions/packages/google-drive/wasm-src/src/api.rs:34-44 | crates/extensions/packages/google-sheets/wasm-src/src/api.rs:25-35 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:25-35 | crates/extensions/packages/slack/wasm-src/src/api.rs:214-224 — before extracting anything, compare `crates/extensions/packages/google-docs/wasm-src/src/api.rs` and `crates/extensions/packages/google-drive/wasm-src/src/api.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 5) crates/domains/ironclaw_triggers/src/libsql.rs:233— crates/domains/ironclaw_triggers/src/libsql.rs:233-244 | crates/domains/ironclaw_triggers/src/libsql.rs:248-259 | crates/domains/ironclaw_triggers/src/libsql.rs:263-274 | crates/domains/ironclaw_triggers/src/libsql.rs:276-286 | crates/domains/ironclaw_triggers/src/libsql.rs:288-305 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6–8 lines × 2) harness/latency/runner/src/main.rs:361— harness/latency/runner/src/main.rs:361-368 | harness/latency/runner/src/runtime_workloads.rs:222-227 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6–8 lines × 2) scripts/dev_metrics.py:514— scripts/dev_metrics.py:514-521 | scripts/dev_metrics.py:532-537 — 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.
Duplicated block (7 lines × 5) crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:281— crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:281-287 | crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:311-317 | crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:384-390 | crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:534-540 | crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:666-672 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 5) crates/extensions/packages/google-docs/wasm-src/src/api.rs:46— crates/extensions/packages/google-docs/wasm-src/src/api.rs:46-52 | crates/extensions/packages/google-drive/wasm-src/src/api.rs:52-58 | crates/extensions/packages/google-sheets/wasm-src/src/api.rs:43-49 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:43-49 | crates/extensions/packages/slack/wasm-src/src/api.rs:143-149 — before extracting anything, compare `crates/extensions/packages/google-docs/wasm-src/src/api.rs` and `crates/extensions/packages/google-drive/wasm-src/src/api.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 4) crates/domains/ironclaw_conversations/src/memory.rs:313— crates/domains/ironclaw_conversations/src/memory.rs:313-318 | crates/domains/ironclaw_conversations/src/memory.rs:674-678 | crates/domains/ironclaw_conversations/src/memory.rs:902-906 | crates/domains/ironclaw_conversations/src/memory.rs:1135-1139 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 4) crates/domains/ironclaw_triggers/src/libsql.rs:493— crates/domains/ironclaw_triggers/src/libsql.rs:493-497 | crates/domains/ironclaw_triggers/src/libsql.rs:557-561 | crates/domains/ironclaw_triggers/src/libsql.rs:750-754 | crates/domains/ironclaw_triggers/src/libsql.rs:814-818 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (25 lines × 2) crates/domains/ironclaw_triggers/src/libsql.rs:1210— crates/domains/ironclaw_triggers/src/libsql.rs:1210-1234 | crates/domains/ironclaw_triggers/src/libsql.rs:1289-1313 — 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.
Duplicated block (25 lines × 2) scripts/workflow_canary/scenarios/manual_trigger_from_telegram.py:52— scripts/workflow_canary/scenarios/manual_trigger_from_telegram.py:52-76 | scripts/workflow_canary/scenarios/routine_visibility_from_telegram.py:49-73 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13–17 lines × 3) scripts/reborn_webui_v2_live_qa/run_live_qa.py:8491— scripts/reborn_webui_v2_live_qa/run_live_qa.py:8491-8503 | scripts/reborn_webui_v2_live_qa/run_live_qa.py:8546-8559 | scripts/reborn_webui_v2_live_qa/run_live_qa.py:8743-8759 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13–17 lines × 3) crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:439— crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:439-455 | crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:513-525 | crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:581-593 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Outbound HTTP without resilience crates/app/ironclaw_cli/src/commands/traces/mod.rs:1261— `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. 2 of the 39 files that make outbound calls are unbounded; the first 2 are listed.
Outbound HTTP without resilience crates/domains/ironclaw_llm/src/session.rs:131— `Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
R10 · Code Duplication· Duplicated block with local edits (46 matched lines × 2 locations) · ×2
Duplicated block with local edits (46 matched lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/jobs/jobs-page.tsx:79— crates/product/ironclaw_webui/frontend/src/pages/jobs/jobs-page.tsx:79 · crates/product/ironclaw_webui/frontend/src/pages/projects/projects-page.tsx:90 — the two spans are one implementation copied and then locally edited — 303 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.
Duplicated block with local edits (46 matched lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/projects/components/projects-grid.tsx:11— crates/product/ironclaw_webui/frontend/src/pages/projects/components/projects-grid.tsx:11 · crates/product/ironclaw_webui/frontend/src/pages/projects/components/projects-grid.tsx:81 — the two spans are one implementation copied and then locally edited — 275 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.
Duplicated block (14 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:720— crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:720 · crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:970 — 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.
Duplicated block (14 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/settings/lib/trace-api.ts:52— crates/product/ironclaw_webui/frontend/src/pages/settings/lib/trace-api.ts:52 · crates/product/ironclaw_webui/frontend/src/pages/settings/lib/trace-api.ts:100 — 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.
R4 · Test Coverage· This test file cannot be loaded · ×2
This test file cannot be loaded crates/product/ironclaw_webui/frontend/src/app/retired-routines.test.ts— crates/product/ironclaw_webui/frontend/src/app/retired-routines.test.ts:9 imports '../', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded crates/product/ironclaw_webui/frontend/src/styles/theme-colors.test.ts— crates/product/ironclaw_webui/frontend/src/styles/theme-colors.test.ts:7 imports '../', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
AC1 · Text alternatives· <video> without a captions track · ×1
<video> without a captions track crates/product/ironclaw_webui/frontend/src/pages/chat/components/attachment-preview.tsx:207— Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation).
AC2 · Forms & labels· <Textarea> field component without a label · ×1
<Textarea> field component without a label crates/product/ironclaw_webui/frontend/src/pages/settings/components/skill-card.tsx:83— This UI-library field component has no label / aria-label / aria-labelledby / id / name — and neither does anything it renders — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC3 · Page structure· Page without a main landmark · ×1
Page without a main landmark crates/product/ironclaw_webui/frontend/public/wallet-connect.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Low contrast colour pair in CSS (2.6:1) crates/product/ironclaw_webui/frontend/src/styles/app.css:273— `[class~="bg-signal"],[class~="bg-signal/60"]` sets color: #ffffff !important on background-color: #4ca7e6 !important — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC7 · A11y enforcement· Accessibility enforcement below the top rung · ×1
Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 161 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
useChat.useChat (cyclomatic 170) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChat.ts:153— useChat.useChat has cyclomatic complexity 170 (threshold 15). Most of this is not in the body itself: 5 of the 170 points are its own statements and the rest belongs to 38 function literals inside it that branch (lines 539, 916, 1063, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
chat-input.ChatInput (cyclomatic 119) crates/product/ironclaw_webui/frontend/src/pages/chat/components/chat-input.tsx:30— chat-input.ChatInput has cyclomatic complexity 119 (threshold 15). Of this number, 35 points are the body's own statements and 84 belong to 21 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
useChatEvents.applyProjectionItems (cyclomatic 113) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:523— useChatEvents.applyProjectionItems has cyclomatic complexity 113 (threshold 15). Of this number, 71 points are the body's own statements and 42 belong to 9 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
useChannelOnboarding.useChannelOnboarding (cyclomatic 104) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChannelOnboarding.ts:207— useChannelOnboarding.useChannelOnboarding has cyclomatic complexity 104 (threshold 15). Most of this is not in the body itself: 1 of the 104 points is its own statement and the rest belongs to 22 function literals inside it that branch (lines 511, 353, 281, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
message-bubble.MessageBubbleImpl (cyclomatic 98) crates/product/ironclaw_webui/frontend/src/pages/chat/components/message-bubble.tsx:124— message-bubble.MessageBubbleImpl has cyclomatic complexity 98 (threshold 15). Of this number, 83 points are the body's own statements and 15 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
chat.Chat (cyclomatic 82) crates/product/ironclaw_webui/frontend/src/pages/chat/chat.tsx:106— chat.Chat has cyclomatic complexity 82 (threshold 15). Of this number, 49 points are the body's own statements and 33 belong to 11 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
useSSE.useSSE (cyclomatic 75) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useSSE.ts:117— useSSE.useSSE has cyclomatic complexity 75 (threshold 15). Most of this is not in the body itself: 1 of the 75 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 131, 227, 255, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
configure-modal.ConfigureModal (cyclomatic 75) crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx:44— configure-modal.ConfigureModal has cyclomatic complexity 75 (threshold 15). Of this number, 45 points are the body's own statements and 30 belong to 11 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
select-menu.SelectMenu (cyclomatic 66) crates/product/ironclaw_webui/frontend/src/design-system/select-menu.tsx:229— select-menu.SelectMenu has cyclomatic complexity 66 (threshold 15). Of this number, 24 points are the body's own statements and 42 belong to 11 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RebornConfigFile::validate (cyclomatic 63) crates/app/ironclaw_config/src/config_file.rs:961— RebornConfigFile::validate has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
useInspector.useInspector (cyclomatic 63) crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/useInspector.ts:137— useInspector.useInspector has cyclomatic complexity 63 (threshold 15). Most of this is not in the body itself: 1 of the 63 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 249, 194, 227, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
useHistory.useHistory (cyclomatic 60) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useHistory.ts:75— useHistory.useHistory has cyclomatic complexity 60 (threshold 15). Most of this is not in the body itself: 15 of the 60 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 123, 322, 218, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
check-regression-promotions.validate (cyclomatic 58) scripts/ci/check-regression-promotions.py:43— check-regression-promotions.validate has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ws12_workflow_contracts.validate_libsql_scripted_memory_job (cyclomatic 57) scripts/ci/ws12_workflow_contracts.py:596— ws12_workflow_contracts.validate_libsql_scripted_memory_job has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
device-link-panel.DeviceLinkPanel (cyclomatic 57) crates/product/ironclaw_webui/frontend/src/components/device-link-panel.tsx:90— device-link-panel.DeviceLinkPanel has cyclomatic complexity 57 (threshold 15). Of this number, 23 points are the body's own statements and 34 belong to 10 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
model-selection-policy-editor.ModelSelectionPolicyEditor (cyclomatic 57) crates/product/ironclaw_webui/frontend/src/pages/settings/components/model-selection-policy-editor.tsx:53— model-selection-policy-editor.ModelSelectionPolicyEditor has cyclomatic complexity 57 (threshold 15). Of this number, 19 points are the body's own statements and 38 belong to 10 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
useExtensions.useOauthSetup (cyclomatic 55) crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts:463— useExtensions.useOauthSetup has cyclomatic complexity 55 (threshold 15). Most of this is not in the body itself: 1 of the 55 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 514, 681, 621, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
reborn_changed_coverage.main (cyclomatic 53) scripts/ci/reborn_changed_coverage.py:1066— reborn_changed_coverage.main has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
message-list.MessageList (cyclomatic 51) crates/product/ironclaw_webui/frontend/src/pages/chat/components/message-list.tsx:123— message-list.MessageList has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 5 of the 51 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 211, 270, 185, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
useChatEvents.useChatEvents (cyclomatic 51) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:67— useChatEvents.useChatEvents has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 2 of the 51 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 88, 148). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
provider-card.ProviderCard (cyclomatic 51) crates/product/ironclaw_webui/frontend/src/pages/settings/components/provider-card.tsx:17— provider-card.ProviderCard has cyclomatic complexity 51 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
run_live_qa._slack_delivery_routine_case (cyclomatic 50) scripts/reborn_webui_v2_live_qa/run_live_qa.py:5657— run_live_qa._slack_delivery_routine_case has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
critical_mutation_gate.main (cyclomatic 49) scripts/ci/critical_mutation_gate.py:223— critical_mutation_gate.main has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run_live_qa.run_cases (cyclomatic 48) scripts/reborn_webui_v2_live_qa/run_live_qa.py:9337— run_live_qa.run_cases has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_extension_registry::v3::parse_v3 (cyclomatic 45) crates/extensions/ironclaw_extension_registry/src/v3.rs:254— ironclaw_extension_registry::v3::parse_v3 has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reborn_changed_coverage.rust_lexical_structure (cyclomatic 43) scripts/ci/reborn_changed_coverage.py:511— reborn_changed_coverage.rust_lexical_structure has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run_live_qa._current_turn_capability_evidence (cyclomatic 41) scripts/reborn_webui_v2_live_qa/run_live_qa.py:4493— run_live_qa._current_turn_capability_evidence has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
useExtensions.useExtensions (cyclomatic 40) crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts:174— useExtensions.useExtensions has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 13 of the 40 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 225, 263, 277, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
inspector-activity.reduceInspectorActivity (cyclomatic 40) crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/inspector-activity.ts:167— inspector-activity.reduceInspectorActivity has cyclomatic complexity 40 (threshold 15). Of this number, 19 points are the body's own statements and 21 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
user-detail.UserDetailView (cyclomatic 39) crates/product/ironclaw_webui/frontend/src/pages/admin/components/user-detail.tsx:47— user-detail.UserDetailView has cyclomatic complexity 39 (threshold 15). Of this number, 23 points are the body's own statements and 16 belong to 7 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
extension-card.ExtensionCard (cyclomatic 38) crates/product/ironclaw_webui/frontend/src/pages/extensions/components/extension-card.tsx:148— extension-card.ExtensionCard has cyclomatic complexity 38 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
notify_slack.slack_payload (cyclomatic 37) scripts/live-canary/notify_slack.py:1013— notify_slack.slack_payload has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run_live_qa._wait_for_assistant_reply (cyclomatic 37) scripts/reborn_webui_v2_live_qa/run_live_qa.py:2250— run_live_qa._wait_for_assistant_reply has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
pairing-web-code-panel.PairingWebCodePanel (cyclomatic 37) crates/product/ironclaw_webui/frontend/src/components/pairing-web-code-panel.tsx:37— pairing-web-code-panel.PairingWebCodePanel has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 12 of the 37 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 88, 152, 69, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
workspace-tree.WorkspaceTree (cyclomatic 37) crates/product/ironclaw_webui/frontend/src/pages/workspace/components/workspace-tree.tsx:293— workspace-tree.WorkspaceTree has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 5 of the 37 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 375, 318, 327, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
automations-presenters.scheduleLabel (cyclomatic 37) crates/product/ironclaw_webui/frontend/src/pages/automations/lib/automations-presenters.ts:129— automations-presenters.scheduleLabel has cyclomatic complexity 37 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
audit_surface_inventory._api_keywords (cyclomatic 36) scripts/reborn_qa_matrix/audit_surface_inventory.py:126— audit_surface_inventory._api_keywords has cyclomatic complexity 36 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ChannelDescriptor::validate (cyclomatic 35) crates/contracts/ironclaw_extension_contracts/src/channel.rs:353— ChannelDescriptor::validate has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HostRuntimeLoopCapabilityPort::invoke_capability_dispatch (cyclomatic 35) crates/loop/ironclaw_loop_host/src/capability_port.rs:2444— HostRuntimeLoopCapabilityPort::invoke_capability_dispatch has cyclomatic complexity 35 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
logs-page.LogsPage (cyclomatic 35) crates/product/ironclaw_webui/frontend/src/pages/logs/logs-page.tsx:121— logs-page.LogsPage has cyclomatic complexity 35 (threshold 15). Of this number, 31 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ServeCommand::execute (cyclomatic 34) crates/app/ironclaw_cli/src/commands/serve.rs:120— ServeCommand::execute has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
slack_helpers._slack_personal_auth_preflight (cyclomatic 33) REDACTED:912— slack_helpers._slack_personal_auth_preflight has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
markdown-renderer.MarkdownRendererImpl (cyclomatic 33) crates/product/ironclaw_webui/frontend/src/pages/chat/components/markdown-renderer.tsx:163— markdown-renderer.MarkdownRendererImpl has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 15 of the 33 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 186, 261, 209, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
users-tab.AdminUsersTabView (cyclomatic 33) crates/product/ironclaw_webui/frontend/src/pages/admin/components/users-tab.tsx:223— users-tab.AdminUsersTabView has cyclomatic complexity 33 (threshold 15). Of this number, 19 points are the body's own statements and 14 belong to 7 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
RebornLoopDriverHostFactory::build_text_only_host_with_capabilities (cyclomatic 32) crates/loop/ironclaw_turn_runner/src/loop_driver_host.rs:1591— RebornLoopDriverHostFactory::build_text_only_host_with_capabilities has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
notify_slack.main (cyclomatic 32) scripts/live-canary/notify_slack.py:1611— notify_slack.main has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
google_auth_helpers._google_runtime_access_token (cyclomatic 32) scripts/reborn_webui_v2_live_qa/google_auth_helpers.py:403— google_auth_helpers._google_runtime_access_token has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run_live_qa._wait_for_slack_delivery_marker (cyclomatic 32) scripts/reborn_webui_v2_live_qa/run_live_qa.py:3924— run_live_qa._wait_for_slack_delivery_marker has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
useLlmProviders.useLlmProviders (cyclomatic 32) crates/product/ironclaw_webui/frontend/src/pages/settings/hooks/useLlmProviders.ts:68— useLlmProviders.useLlmProviders has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 14 of the 32 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 152, 120, 131). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
tool-activity-state.mergeToolActivity (cyclomatic 32) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/tool-activity-state.ts:136— tool-activity-state.mergeToolActivity has cyclomatic complexity 32 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
useLogs.useLogs (cyclomatic 32) crates/product/ironclaw_webui/frontend/src/pages/logs/hooks/useLogs.ts:92— useLogs.useLogs has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 6 of the 32 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 187, 154, 230, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
notify_slack.parse_reborn_qa_case_reports (cyclomatic 31) scripts/live-canary/notify_slack.py:415— notify_slack.parse_reborn_qa_case_reports has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run_live_qa.prepare_reborn_home (cyclomatic 30) scripts/reborn_webui_v2_live_qa/run_live_qa.py:506— run_live_qa.prepare_reborn_home has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
skill-card.SkillCard (cyclomatic 30) crates/product/ironclaw_webui/frontend/src/pages/settings/components/skill-card.tsx:8— skill-card.SkillCard has cyclomatic complexity 30 (threshold 15). Of this number, 25 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ProductAdapterError::from (cyclomatic 29) crates/product/ironclaw_assistant/src/error.rs:313— ProductAdapterError::from has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
CodexChatGptProvider::handle_sse_event (cyclomatic 29) crates/domains/ironclaw_llm/src/codex_chatgpt.rs:868— CodexChatGptProvider::handle_sse_event has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NearAiChatProvider::send_streaming_request_inner (cyclomatic 29) crates/domains/ironclaw_llm/src/nearai_chat.rs:573— NearAiChatProvider::send_streaming_request_inner has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DeliveryCoordinator::drive_prepared (cyclomatic 29) crates/product/ironclaw_assistant/src/delivery_coordinator.rs:837— DeliveryCoordinator::drive_prepared has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
critical_mutation_gate.load_manifest (cyclomatic 29) scripts/ci/critical_mutation_gate.py:108— critical_mutation_gate.load_manifest has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run_live_qa._slack_correctness_chat_reply (cyclomatic 29) scripts/reborn_webui_v2_live_qa/run_live_qa.py:7676— run_live_qa._slack_correctness_chat_reply has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
automation-detail-panel.AutomationDetailPanel (cyclomatic 29) crates/product/ironclaw_webui/frontend/src/pages/automations/components/automation-detail-panel.tsx:38— automation-detail-panel.AutomationDetailPanel has cyclomatic complexity 29 (threshold 15). Of this number, 22 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
useAdminUsers.useAdminUsers (cyclomatic 29) crates/product/ironclaw_webui/frontend/src/pages/admin/hooks/useAdminUsers.ts:57— useAdminUsers.useAdminUsers has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 10 of the 29 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 96, 119, 166, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
LoopRuntimeContext::render_model_content (cyclomatic 28) crates/contracts/ironclaw_loop_contracts/src/runtime_context.rs:157— LoopRuntimeContext::render_model_content has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LibSqlTriggerRepository::run_migrations (cyclomatic 28) crates/domains/ironclaw_triggers/src/libsql.rs:92— LibSqlTriggerRepository::run_migrations has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CapabilityDeclV2::from_raw (cyclomatic 28) crates/extensions/ironclaw_extension_registry/src/v2.rs:1193— CapabilityDeclV2::from_raw has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reborn_changed_coverage.load_manifest (cyclomatic 28) scripts/ci/reborn_changed_coverage.py:307— reborn_changed_coverage.load_manifest has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
google_auth_helpers._google_product_auth_preflight (cyclomatic 28) scripts/reborn_webui_v2_live_qa/google_auth_helpers.py:531— google_auth_helpers._google_product_auth_preflight has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run_live_qa._apply_extension_setup_api_after_start (cyclomatic 28) scripts/reborn_webui_v2_live_qa/run_live_qa.py:1136— run_live_qa._apply_extension_setup_api_after_start has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run_live_qa._slack_membership_view (cyclomatic 28) scripts/reborn_webui_v2_live_qa/run_live_qa.py:7169— run_live_qa._slack_membership_view has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ModelStage::process (cyclomatic 27) crates/loop/ironclaw_agent_loop/src/executor/model.rs:58— ModelStage::process has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DefaultExecutorPipeline::execute (cyclomatic 27) crates/loop/ironclaw_agent_loop/src/executor/canonical.rs:17— DefaultExecutorPipeline::execute has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
product-activity-envelope.publishProductInspectorEnvelope (cyclomatic 27) crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/product-activity-envelope.ts:123— product-activity-envelope.publishProductInspectorEnvelope has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LibSqlRootFilesystem::ensure_index (cyclomatic 26) REDACTED:433— LibSqlRootFilesystem::ensure_index has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run_live_qa._slack_personal_dm_counterpart_names (cyclomatic 26) scripts/reborn_webui_v2_live_qa/run_live_qa.py:3409— run_live_qa._slack_personal_dm_counterpart_names has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
notification-panel.NotificationPanel (cyclomatic 26) crates/product/ironclaw_webui/frontend/src/components/notification-panel.tsx:88— notification-panel.NotificationPanel has cyclomatic complexity 26 (threshold 15). Of this number, 15 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
useProviderDialogForm.useProviderDialogForm (cyclomatic 26) crates/product/ironclaw_webui/frontend/src/pages/settings/hooks/useProviderDialogForm.ts:22— useProviderDialogForm.useProviderDialogForm has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 63, 105, 89, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
custom-mcp-registration-modal.CustomMcpRegistrationModal (cyclomatic 26) crates/product/ironclaw_webui/frontend/src/pages/extensions/components/custom-mcp-registration-modal.tsx:91— custom-mcp-registration-modal.CustomMcpRegistrationModal has cyclomatic complexity 26 (threshold 15). Of this number, 20 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
settings-field.SettingsField (cyclomatic 26) crates/product/ironclaw_webui/frontend/src/pages/settings/components/settings-field.tsx:21— settings-field.SettingsField has cyclomatic complexity 26 (threshold 15). Of this number, 16 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
trace-commons-tab.TraceCommonsTab (cyclomatic 26) crates/product/ironclaw_webui/frontend/src/pages/settings/components/trace-commons-tab.tsx:103— trace-commons-tab.TraceCommonsTab has cyclomatic complexity 26 (threshold 15). Of this number, 21 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
useThreadScrape.useThreadScrape (cyclomatic 26) crates/product/ironclaw_webui/frontend/src/pages/admin/hooks/useThreadScrape.ts:70— useThreadScrape.useThreadScrape has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 177, 209, 133, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ExtensionHostLifecycleProductService::execute_action (cyclomatic 25) crates/extensions/ironclaw_extension_manager/src/lifecycle_product_service.rs:92— ExtensionHostLifecycleProductService::execute_action has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run_live_qa.parse_case_llm_trace_metrics (cyclomatic 25) scripts/reborn_webui_v2_live_qa/run_live_qa.py:799— run_live_qa.parse_case_llm_trace_metrics has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
history-messages.toolCardFromPreview (cyclomatic 25) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/history-messages.ts:201— history-messages.toolCardFromPreview has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
useHistory.mergeFullRefresh (cyclomatic 25) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useHistory.ts:483— useHistory.mergeFullRefresh has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 535, 514). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
attachment-preview.AttachmentPreviewModal (cyclomatic 25) crates/product/ironclaw_webui/frontend/src/pages/chat/components/attachment-preview.tsx:38— attachment-preview.AttachmentPreviewModal has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 79, 55, 118, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
link-payload-panel.LinkPayloadPanel (cyclomatic 25) crates/product/ironclaw_webui/frontend/src/components/link-payload-panel.tsx:70— link-payload-panel.LinkPayloadPanel has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 140, 126, 91, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
skills-tab.SkillsTab (cyclomatic 25) crates/product/ironclaw_webui/frontend/src/pages/settings/components/skills-tab.tsx:14— skills-tab.SkillsTab has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 36, 54, 77, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
thread-scraping-panel.ThreadScrapingPanel (cyclomatic 25) crates/product/ironclaw_webui/frontend/src/pages/admin/components/thread-scraping-panel.tsx:12— thread-scraping-panel.ThreadScrapingPanel has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
index.render (cyclomatic 25) docs/internal/archived-skills/portfolio/widget/index.js:70— index.render has cyclomatic complexity 25 (threshold 15). Of this number, 14 points are the body's own statements and 11 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
InMemoryAuthProductServices::cleanup_for_lifecycle (cyclomatic 24) crates/domains/ironclaw_auth/src/fakes.rs:1380— InMemoryAuthProductServices::cleanup_for_lifecycle has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ChannelConfigService::save (cyclomatic 24) crates/extensions/ironclaw_extension_host/src/channel_config.rs:231— ChannelConfigService::save has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_sandbox::sandbox_process::user_container::sweep_idle_user_containers (cyclomatic 24) crates/lanes/ironclaw_sandbox/src/sandbox_process/user_container.rs:596— ironclaw_sandbox::sandbox_process::user_container::sweep_idle_user_containers has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_filesystem::cas::cas_update_loop (cyclomatic 24) crates/substrates/ironclaw_filesystem/src/cas.rs:351— ironclaw_filesystem::cas::cas_update_loop has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
changed_workspace_packages.classify_clippy_scope (cyclomatic 24) scripts/ci/changed_workspace_packages.py:114— changed_workspace_packages.classify_clippy_scope has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
onboarding-pairing-card.OnboardingPairingCard (cyclomatic 24) crates/product/ironclaw_webui/frontend/src/pages/chat/components/onboarding-pairing-card.tsx:18— onboarding-pairing-card.OnboardingPairingCard has cyclomatic complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
inspector-panel.InspectorPanelCore (cyclomatic 24) crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/inspector-panel.tsx:781— inspector-panel.InspectorPanelCore has cyclomatic complexity 24 (threshold 15). Of this number, 15 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
jobs-page.JobsPage (cyclomatic 24) crates/product/ironclaw_webui/frontend/src/pages/jobs/jobs-page.tsx:23— jobs-page.JobsPage has cyclomatic complexity 24 (threshold 15). Of this number, 16 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CredentialManager::perform_oauth_login (cyclomatic 23) crates/domains/ironclaw_llm/src/gemini_oauth.rs:574— CredentialManager::perform_oauth_login has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HostRuntimeServices::validate_production_wiring (cyclomatic 23) crates/kernel/ironclaw_host_runtime/src/services/production_services.rs:21— HostRuntimeServices::validate_production_wiring has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ProductRuntimeProjectionStream::forward_subscription (cyclomatic 23) crates/product/ironclaw_assistant/src/projection.rs:478— ProductRuntimeProjectionStream::forward_subscription has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
check-reborn-branch-coverage-flags.main (cyclomatic 23) scripts/ci/check-reborn-branch-coverage-flags.py:26— check-reborn-branch-coverage-flags.main has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
history-messages.messagesFromTimeline (cyclomatic 23) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/history-messages.ts:57— history-messages.messagesFromTimeline has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
useHistory.hydrateFreshMessages (cyclomatic 23) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useHistory.ts:687— useHistory.hydrateFreshMessages has cyclomatic complexity 23 (threshold 15). Of this number, 12 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
useHistory.insertPreservedAtOriginalPositions (cyclomatic 23) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useHistory.ts:736— useHistory.insertPreservedAtOriginalPositions has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
button.Button (cyclomatic 23) crates/product/ironclaw_webui/frontend/src/design-system/button.tsx:110— button.Button has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
projects-page.ProjectsPage (cyclomatic 23) crates/product/ironclaw_webui/frontend/src/pages/projects/projects-page.tsx:14— projects-page.ProjectsPage has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
FilesystemInboundBatchStore::stage (cyclomatic 22) crates/extensions/ironclaw_extension_host/src/inbound_batches.rs:733— FilesystemInboundBatchStore::stage has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
check-target-tree.compare (cyclomatic 22) scripts/ci/check-target-tree.py:280— check-target-tree.compare has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
notify_slack.github_comment_body (cyclomatic 22) scripts/live-canary/notify_slack.py:1248— notify_slack.github_comment_body has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
useNotifications.useNotifications (cyclomatic 22) crates/product/ironclaw_webui/frontend/src/hooks/useNotifications.ts:105— useNotifications.useNotifications has cyclomatic complexity 22 (threshold 15). Of this number, 12 points are the body's own statements and 10 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
auth-oauth-card.AuthOauthCard (cyclomatic 22) crates/product/ironclaw_webui/frontend/src/pages/chat/components/auth-oauth-card.tsx:60— auth-oauth-card.AuthOauthCard has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
inspector-panel.PromptShell (cyclomatic 22) crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/inspector-panel.tsx:101— inspector-panel.PromptShell has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
inference-tab.InferenceTab (cyclomatic 22) crates/product/ironclaw_webui/frontend/src/pages/settings/components/inference-tab.tsx:26— inference-tab.InferenceTab has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CompactionTask::validate_range (cyclomatic 21) crates/loop/ironclaw_loop_host/src/compaction_task.rs:293— CompactionTask::validate_range has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
OperatorLogBuffer::query (cyclomatic 21) crates/product/ironclaw_operator/src/operator_logs.rs:382— OperatorLogBuffer::query has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
check-target-tree.parse_tree (cyclomatic 21) scripts/ci/check-target-tree.py:164— check-target-tree.parse_tree has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reborn_changed_coverage.parse_diff (cyclomatic 21) scripts/ci/reborn_changed_coverage.py:442— reborn_changed_coverage.parse_diff has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
notify_slack.parse_reborn_trace_tool_calls (cyclomatic 21) scripts/live-canary/notify_slack.py:356— notify_slack.parse_reborn_trace_tool_calls has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
notification-center.NotificationCenter (cyclomatic 21) crates/product/ironclaw_webui/frontend/src/components/notification-center.tsx:67— notification-center.NotificationCenter has cyclomatic complexity 21 (threshold 15). Of this number, 14 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
suggestions-api.decodeSuggestion (cyclomatic 21) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/suggestions-api.ts:61— suggestions-api.decodeSuggestion has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
tool-activity.ToolDetailPanel (cyclomatic 21) crates/product/ironclaw_webui/frontend/src/pages/chat/components/tool-activity.tsx:223— tool-activity.ToolDetailPanel has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
inspector-panel.ActivityEntry (cyclomatic 21) crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/inspector-panel.tsx:569— inspector-panel.ActivityEntry has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
notification-channels-panel.DevicePushBlock (cyclomatic 21) crates/product/ironclaw_webui/frontend/src/pages/automations/components/notification-channels-panel.tsx:29— notification-channels-panel.DevicePushBlock has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
notification-channels-panel.NotificationChannelsPanel (cyclomatic 21) crates/product/ironclaw_webui/frontend/src/pages/automations/components/notification-channels-panel.tsx:212— notification-channels-panel.NotificationChannelsPanel has cyclomatic complexity 21 (threshold 15). Of this number, 12 points are the body's own statements and 9 belong to 7 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
user-secrets-panel.UserSecretsPanelView (cyclomatic 21) crates/product/ironclaw_webui/frontend/src/pages/admin/components/user-secrets-panel.tsx:15— user-secrets-panel.UserSecretsPanelView has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
configuration-tab.ConfigurationGroup (cyclomatic 21) crates/product/ironclaw_webui/frontend/src/pages/admin/components/configuration-tab.tsx:76— configuration-tab.ConfigurationGroup has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 141, 94, 128). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ProjectScopedAttachmentLander::cleanup_stale (cyclomatic 20) crates/domains/ironclaw_attachments/src/project_scoped.rs:124— ProjectScopedAttachmentLander::cleanup_stale has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_extractors::parse_xlsx_sheet (cyclomatic 20) crates/domains/ironclaw_extractors/src/lib.rs:677— ironclaw_extractors::parse_xlsx_sheet has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_memory::service::bounded_search_excerpts (cyclomatic 20) crates/domains/ironclaw_memory/src/service.rs:771— ironclaw_memory::service::bounded_search_excerpts has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ProcessJournalStore::initialize_materialized (cyclomatic 20) crates/kernel/ironclaw_processes/src/journal_store.rs:528— ProcessJournalStore::initialize_materialized has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reborn_changed_coverage.mechanically_uninstrumentable_lines (cyclomatic 20) scripts/ci/reborn_changed_coverage.py:626— reborn_changed_coverage.mechanically_uninstrumentable_lines has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run_live_qa._resolve_slack_personal_bot_dm_channel (cyclomatic 20) scripts/reborn_webui_v2_live_qa/run_live_qa.py:7393— run_live_qa._resolve_slack_personal_bot_dm_channel has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
crm_tracker.run (cyclomatic 20) scripts/workflow_canary/scenarios/crm_tracker.py:120— crm_tracker.run has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
sidebar-threads.SidebarThreads (cyclomatic 20) crates/product/ironclaw_webui/frontend/src/components/sidebar-threads.tsx:237— sidebar-threads.SidebarThreads has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
markdown-renderer.enhanceCodeBlocks (cyclomatic 20) crates/product/ironclaw_webui/frontend/src/pages/chat/components/markdown-renderer.tsx:24— markdown-renderer.enhanceCodeBlocks has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 111, 73, 84, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
tool-activity-state.toolCardFromGate (cyclomatic 20) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/tool-activity-state.ts:71— tool-activity-state.toolCardFromGate has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
custom-mcp-registration-modal.connectionErrors (cyclomatic 20) crates/product/ironclaw_webui/frontend/src/pages/extensions/components/custom-mcp-registration-modal.tsx:52— custom-mcp-registration-modal.connectionErrors has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
registry-tab.RegistryTab (cyclomatic 20) crates/product/ironclaw_webui/frontend/src/pages/extensions/components/registry-tab.tsx:64— registry-tab.RegistryTab has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
google_docs_tool::api::create_table_with_data (cyclomatic 19) crates/extensions/packages/google-docs/wasm-src/src/api.rs:865— google_docs_tool::api::create_table_with_data has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TelegramChannelAdapter::send (cyclomatic 19) crates/extensions/packages/telegram/src/channel.rs:271— TelegramChannelAdapter::send has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_approvals::profile_gate::require_approval_for_profile_policy (cyclomatic 19) crates/kernel/ironclaw_approvals/src/profile_gate.rs:268— ironclaw_approvals::profile_gate::require_approval_for_profile_policy has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BuiltinFirstPartyTools::dispatch (cyclomatic 19) crates/kernel/ironclaw_host_runtime/src/first_party_tools/mod.rs:799— BuiltinFirstPartyTools::dispatch has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
HookDispatcher::dispatch_before_capability (cyclomatic 19) crates/loop/ironclaw_hooks/src/dispatch/mod.rs:1106— HookDispatcher::dispatch_before_capability has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ResultReadHandler::invoke (cyclomatic 19) crates/loop/ironclaw_loop_host/src/result_read.rs:174— ResultReadHandler::invoke has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SubagentSpawnCapabilityPort::invoke_capability_batch (cyclomatic 19) crates/loop/ironclaw_loop_host/src/subagent_spawn_port.rs:1278— SubagentSpawnCapabilityPort::invoke_capability_batch has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
check-guidance._reference_lines (cyclomatic 19) scripts/ci/check-guidance.py:539— check-guidance._reference_lines has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
import-reborn-run-artifact.build_turn (cyclomatic 19) scripts/import-reborn-run-artifact.py:93— import-reborn-run-artifact.build_turn has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
notify_slack.parse_results_json (cyclomatic 19) scripts/live-canary/notify_slack.py:223— notify_slack.parse_results_json has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
notify_slack._markdown_reborn_case_lines (cyclomatic 19) scripts/live-canary/notify_slack.py:1190— notify_slack._markdown_reborn_case_lines has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
notify_slack.create_canary_issues (cyclomatic 19) scripts/live-canary/notify_slack.py:1455— notify_slack.create_canary_issues has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
auth_registry.configured_seeded_cases (cyclomatic 19) scripts/live_canary/auth_registry.py:214— auth_registry.configured_seeded_cases has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
audit_defect_traceability.build_audit (cyclomatic 19) scripts/reborn_qa_matrix/audit_defect_traceability.py:77— audit_defect_traceability.build_audit has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
run_live_qa._trigger_run_slack_send_evidence (cyclomatic 19) scripts/reborn_webui_v2_live_qa/run_live_qa.py:3685— run_live_qa._trigger_run_slack_send_evidence has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
auth.useAuthSession (cyclomatic 19) crates/product/ironclaw_webui/frontend/src/app/auth.ts:132— auth.useAuthSession has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 191, 228, 135, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
sidebar-nav.ExpandableNavItem (cyclomatic 19) crates/product/ironclaw_webui/frontend/src/components/sidebar-nav.tsx:49— sidebar-nav.ExpandableNavItem has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
approval-card.ApprovalCard (cyclomatic 19) crates/product/ironclaw_webui/frontend/src/pages/chat/components/approval-card.tsx:39— approval-card.ApprovalCard has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
useProviderLogin.useProviderLogin (cyclomatic 19) crates/product/ironclaw_webui/frontend/src/pages/settings/hooks/useProviderLogin.ts:166— useProviderLogin.useProviderLogin has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 304, 198, 253, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
workspace-api.readWorkspaceFile (cyclomatic 19) crates/product/ironclaw_webui/frontend/src/pages/workspace/lib/workspace-api.ts:472— workspace-api.readWorkspaceFile has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
user-model-preference-selector.UserModelPreferenceSelector (cyclomatic 19) crates/product/ironclaw_webui/frontend/src/pages/settings/components/user-model-preference-selector.tsx:19— user-model-preference-selector.UserModelPreferenceSelector has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ProductProjectionItem::validate (cyclomatic 18) crates/contracts/ironclaw_product_contracts/src/outbound.rs:1052— ProductProjectionItem::validate has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RebornProductAuthServices::handle_oauth_callback_with_optional_provider_identity_check (cyclomatic 18) crates/domains/ironclaw_auth/src/product_auth/api/auth.rs:1212— RebornProductAuthServices::handle_oauth_callback_with_optional_provider_identity_check has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HostedMcpPreparationService::attempt_hosted_mcp_preparation (cyclomatic 18) crates/extensions/ironclaw_extension_host/src/hosted_mcp_preparation.rs:419— HostedMcpPreparationService::attempt_hosted_mcp_preparation has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
DefaultTurnCoordinator::derive_unbound_submission (cyclomatic 18) crates/kernel/ironclaw_turns/src/coordinator.rs:272— DefaultTurnCoordinator::derive_unbound_submission has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_turn_runner::runtime::build_default_planned_runtime_inner (cyclomatic 18) crates/loop/ironclaw_turn_runner/src/runtime.rs:705— ironclaw_turn_runner::runtime::build_default_planned_runtime_inner has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
LiveProjectionPublisher::publish_reply_revision (cyclomatic 18) crates/product/ironclaw_assistant/src/projection/live_progress.rs:479— LiveProjectionPublisher::publish_reply_revision has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
check-guidance.parse_frontmatter_paths (cyclomatic 18) scripts/ci/check-guidance.py:826— check-guidance.parse_frontmatter_paths has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run_live_qa._model_delivery_summary (cyclomatic 18) scripts/reborn_webui_v2_live_qa/run_live_qa.py:2841— run_live_qa._model_delivery_summary has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
calendar_prep.run (cyclomatic 18) scripts/workflow_canary/scenarios/calendar_prep.py:80— calendar_prep.run has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
activity-summary.summarizeActivity (cyclomatic 18) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/activity-summary.ts:23— activity-summary.summarizeActivity has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
failureMessages.isClientGeneratedRequestMessage (cyclomatic 18) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/failureMessages.ts:162— failureMessages.isClientGeneratedRequestMessage has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
connection-status.ConnectionStatus (cyclomatic 18) crates/product/ironclaw_webui/frontend/src/pages/chat/components/connection-status.tsx:42— connection-status.ConnectionStatus has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RefreshingCapabilityPort::build_inner (cyclomatic 17) crates/app/ironclaw_composition/src/runtime/capability_host/refreshing_capability_port.rs:185— RefreshingCapabilityPort::build_inner has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_extension_manager::ironhub::catalog::validate_manifest_artifacts (cyclomatic 17) crates/extensions/ironclaw_extension_manager/src/ironhub/catalog.rs:291— ironclaw_extension_manager::ironhub::catalog::validate_manifest_artifacts has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ironclaw_authorization::obligations_for_grant (cyclomatic 17) crates/kernel/ironclaw_authorization/src/lib.rs:1063— ironclaw_authorization::obligations_for_grant has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SearchDocumentBuilder::collect_schema (cyclomatic 17) crates/loop/ironclaw_loop_host/src/tool_search.rs:312— SearchDocumentBuilder::collect_schema has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RunOutcomeProcessCommitObserver::observe_process_commit (cyclomatic 17) crates/product/ironclaw_assistant/src/run_outcome_observer.rs:592— RunOutcomeProcessCommitObserver::observe_process_commit has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LeakDetector::scan (cyclomatic 17) crates/substrates/ironclaw_safety/src/leak_detector.rs:243— LeakDetector::scan has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
check-guidance.discover_guidance (cyclomatic 17) scripts/ci/check-guidance.py:434— check-guidance.discover_guidance has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
check-guidance.extract_references (cyclomatic 17) scripts/ci/check-guidance.py:667— check-guidance.extract_references has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reborn_coverage_lcov.aggregate (cyclomatic 17) scripts/ci/lib/reborn_coverage_lcov.py:207— reborn_coverage_lcov.aggregate has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
notify_slack._format_reborn_qa_group (cyclomatic 17) scripts/live-canary/notify_slack.py:885— notify_slack._format_reborn_qa_group has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
useThreads.useThreads (cyclomatic 17) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useThreads.ts:16— useThreads.useThreads has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 129, 44, 50, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
tool-activity.ToolActivityCard (cyclomatic 17) crates/product/ironclaw_webui/frontend/src/pages/chat/components/tool-activity.tsx:134— tool-activity.ToolActivityCard has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
provider-dialog.ProviderDialog (cyclomatic 17) crates/product/ironclaw_webui/frontend/src/pages/settings/components/provider-dialog.tsx:21— provider-dialog.ProviderDialog has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
automations-presenters.normalizeAutomation (cyclomatic 17) crates/product/ironclaw_webui/frontend/src/pages/automations/lib/automations-presenters.ts:348— automations-presenters.normalizeAutomation has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
extensions-page.ExtensionsPage (cyclomatic 17) crates/product/ironclaw_webui/frontend/src/pages/extensions/extensions-page.tsx:108— extensions-page.ExtensionsPage has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Code.highlight (cyclomatic 17) docs/internal/architecture-video/src/components/Code.tsx:7— Code.highlight has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 27). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
InstructionBundleBuilder::build (cyclomatic 16) crates/contracts/ironclaw_loop_contracts/src/instruction_bundle.rs:230— InstructionBundleBuilder::build has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ironclaw_loop_contracts::content_digest::match_iso8601_bytes (cyclomatic 16) crates/contracts/ironclaw_loop_contracts/src/content_digest.rs:150— ironclaw_loop_contracts::content_digest::match_iso8601_bytes has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ironclaw_skills::selector::prefilter_skills_with_options (cyclomatic 16) crates/domains/ironclaw_skills/src/selector.rs:184— ironclaw_skills::selector::prefilter_skills_with_options has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
TriggerPollerWorker::clear_terminal_active_fires (cyclomatic 16) crates/domains/ironclaw_triggers/src/worker/active_cleanup.rs:21— TriggerPollerWorker::clear_terminal_active_fires has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NativeMemoryService::write (cyclomatic 16) crates/extensions/packages/memory-native/src/service.rs:206— NativeMemoryService::write has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SlackChannelAdapter::send (cyclomatic 16) crates/extensions/packages/slack/src/channel.rs:134— SlackChannelAdapter::send has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Reconciler::resolve_pending (cyclomatic 16) crates/extensions/packages/slack/src/reply_sink/mod.rs:208— Reconciler::resolve_pending has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PredicateEvaluator::evaluate_at (cyclomatic 16) crates/loop/ironclaw_hooks/src/evaluator.rs:151— PredicateEvaluator::evaluate_at has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HookManifestEntry::validate (cyclomatic 16) crates/loop/ironclaw_hooks/src/manifest.rs:223— HookManifestEntry::validate has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HookedLoopCapabilityPort::invoke_capability_batch (cyclomatic 16) crates/loop/ironclaw_hooks/src/middleware/capability_port.rs:326— HookedLoopCapabilityPort::invoke_capability_batch has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InMemoryBackend::query_ordered (cyclomatic 16) crates/substrates/ironclaw_filesystem/src/in_memory.rs:424— InMemoryBackend::query_ordered has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PostgresRootFilesystem::ensure_index (cyclomatic 16) REDACTED:363— PostgresRootFilesystem::ensure_index has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ScriptedDriver::op_for_request (cyclomatic 16) tools/ironclaw_stress/src/scripted.rs:962— ScriptedDriver::op_for_request has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ws12_workflow_contracts.validate_crate_scope_filters (cyclomatic 16) scripts/ci/ws12_workflow_contracts.py:1537— ws12_workflow_contracts.validate_crate_scope_filters has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
import-reborn-run-artifact.trace_candidate (cyclomatic 16) scripts/import-reborn-run-artifact.py:225— import-reborn-run-artifact.trace_candidate has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
notify_slack._format_reborn_metric_summary (cyclomatic 16) scripts/live-canary/notify_slack.py:787— notify_slack._format_reborn_metric_summary has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
auth_runtime.start_oauth_setup (cyclomatic 16) scripts/live_canary/auth_runtime.py:257— auth_runtime.start_oauth_setup has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
google_api_helpers._create_google_spreadsheet_fixture (cyclomatic 16) scripts/reborn_webui_v2_live_qa/google_api_helpers.py:116— google_api_helpers._create_google_spreadsheet_fixture has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run_live_qa._slack_delivery_channel_id (cyclomatic 16) scripts/reborn_webui_v2_live_qa/run_live_qa.py:3516— run_live_qa._slack_delivery_channel_id has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run_live_qa.case_qa_10f_slack_mention_encoding (cyclomatic 16) scripts/reborn_webui_v2_live_qa/run_live_qa.py:8365— run_live_qa.case_qa_10f_slack_mention_encoding has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
run_benchmark.async_main (cyclomatic 16) scripts/tool_discovery_benchmark/run_benchmark.py:802— run_benchmark.async_main has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
_common.run_routine_probe (cyclomatic 16) scripts/workflow_canary/scenarios/_common.py:61— _common.run_routine_probe has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
check-source-conventions.moduleSpecifierForNode (cyclomatic 16) crates/product/ironclaw_webui/frontend/scripts/check-source-conventions.ts:64— check-source-conventions.moduleSpecifierForNode has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
attachments.stageFiles (cyclomatic 16) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/attachments.ts:149— attachments.stageFiles has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
sidebar-threads.ThreadItem (cyclomatic 16) crates/product/ironclaw_webui/frontend/src/components/sidebar-threads.tsx:82— sidebar-threads.ThreadItem has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
useChannelOnboarding.channelConnectionRequirementFromCard (cyclomatic 16) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChannelOnboarding.ts:115— useChannelOnboarding.channelConnectionRequirementFromCard has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
gates.gateFromEvent (cyclomatic 16) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/gates.ts:39— gates.gateFromEvent has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
useChatEvents.isObsoleteProjectionGate (cyclomatic 16) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:490— useChatEvents.isObsoleteProjectionGate has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
inspector-panel.ToolDetailDisclosure (cyclomatic 16) crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/inspector-panel.tsx:470— inspector-panel.ToolDetailDisclosure has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
auth-device-link-card.AuthDeviceLinkCard (cyclomatic 16) crates/product/ironclaw_webui/frontend/src/pages/chat/components/auth-device-link-card.tsx:26— auth-device-link-card.AuthDeviceLinkCard has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
useProviderManagementActions.useProviderManagementActions (cyclomatic 16) crates/product/ironclaw_webui/frontend/src/pages/settings/hooks/useProviderManagementActions.ts:12— useProviderManagementActions.useProviderManagementActions has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 39, 59, 79, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
workspace-tree.TreeNode (cyclomatic 16) crates/product/ironclaw_webui/frontend/src/pages/workspace/components/workspace-tree.tsx:71— workspace-tree.TreeNode has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
project-filesystem-panel.ProjectFilesystemPanel (cyclomatic 16) crates/product/ironclaw_webui/frontend/src/pages/projects/components/project-filesystem-panel.tsx:40— project-filesystem-panel.ProjectFilesystemPanel has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
extension-card.RegistryCard (cyclomatic 16) crates/product/ironclaw_webui/frontend/src/pages/extensions/components/extension-card.tsx:351— extension-card.RegistryCard has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
useChatEvents.applyProjectionItems (cognitive 213) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:523— useChatEvents.applyProjectionItems has cognitive complexity 213 (threshold 15). Drivers by points: if/else 42 (121 pts), ternaries 14 (50 pts), boolean chains 40, loops 2 (nesting depth added 115). Of this number, 138 points are the body's own statements and 75 belong to 9 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
useChat.useChat (cognitive 196) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChat.ts:153— useChat.useChat has cognitive complexity 196 (threshold 15). Drivers by points: if/else 87 (111 pts), boolean chains 53, ternaries 20 (24 pts), error handling 6 (8 pts) (nesting depth added 30). Most of this is not in the body itself: 4 of the 196 points are its own statements and the rest belongs to 38 function literals inside it that branch (lines 539, 1063, 916, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
useChannelOnboarding.useChannelOnboarding (cognitive 107) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChannelOnboarding.ts:207— useChannelOnboarding.useChannelOnboarding has cognitive complexity 107 (threshold 15). Drivers by points: if/else 50 (65 pts), boolean chains 32, ternaries 9, error handling 1 (nesting depth added 15). Most of this is not in the body itself: 0 of the 107 points are its own statements and the rest belongs to 22 function literals inside it that branch (lines 511, 353, 281, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
run_live_qa._wait_for_assistant_reply (cognitive 105) scripts/reborn_webui_v2_live_qa/run_live_qa.py:2250— run_live_qa._wait_for_assistant_reply has cognitive complexity 105 (threshold 15). Drivers by points: if/else 19 (66 pts), error handling 5 (19 pts), ternaries 3 (9 pts), boolean chains 6, loops 2 (5 pts) (nesting depth added 70). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
chat-input.ChatInput (cognitive 104) crates/product/ironclaw_webui/frontend/src/pages/chat/components/chat-input.tsx:30— chat-input.ChatInput has cognitive complexity 104 (threshold 15). Drivers by points: if/else 39 (46 pts), boolean chains 41, ternaries 14 (16 pts), error handling 1 (nesting depth added 9). Of this number, 30 points are the body's own statements and 74 belong to 21 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
RebornConfigFile::validate (cognitive 99) crates/app/ironclaw_config/src/config_file.rs:961— RebornConfigFile::validate has cognitive complexity 99 (threshold 15). Drivers by points: if/else 50 (78 pts), loops 7 (15 pts), boolean chains 6 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa.run_cases (cognitive 87) scripts/reborn_webui_v2_live_qa/run_live_qa.py:9337— run_live_qa.run_cases has cognitive complexity 87 (threshold 15). Drivers by points: if/else 19 (44 pts), boolean chains 18, ternaries 7 (17 pts), loops 3 (5 pts), error handling 1 (3 pts) (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
critical_mutation_gate.main (cognitive 84) scripts/ci/critical_mutation_gate.py:223— critical_mutation_gate.main has cognitive complexity 84 (threshold 15). Drivers by points: if/else 28 (55 pts), ternaries 6 (11 pts), boolean chains 9, loops 4 (6 pts), error handling 2 (3 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reborn_changed_coverage.main (cognitive 82) scripts/ci/reborn_changed_coverage.py:1066— reborn_changed_coverage.main has cognitive complexity 82 (threshold 15). Drivers by points: if/else 35 (56 pts), boolean chains 10, loops 5 (9 pts), ternaries 4 (6 pts), error handling 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reborn_changed_coverage.rust_lexical_structure (cognitive 80) scripts/ci/reborn_changed_coverage.py:511— reborn_changed_coverage.rust_lexical_structure has cognitive complexity 80 (threshold 15). Drivers by points: if/else 18 (48 pts), loops 5 (13 pts), boolean chains 11, ternaries 3 (8 pts) (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check-regression-promotions.validate (cognitive 79) scripts/ci/check-regression-promotions.py:43— check-regression-promotions.validate has cognitive complexity 79 (threshold 15). Drivers by points: if/else 36 (50 pts), boolean chains 13, loops 10, error handling 2 (5 pts), ternaries 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
message-bubble.MessageBubbleImpl (cognitive 78) crates/product/ironclaw_webui/frontend/src/pages/chat/components/message-bubble.tsx:124— message-bubble.MessageBubbleImpl has cognitive complexity 78 (threshold 15). Drivers by points: boolean chains 42, ternaries 18 (26 pts), if/else 7, error handling 3 (nesting depth added 8). Of this number, 61 points are the body's own statements and 17 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ws12_workflow_contracts.validate_libsql_scripted_memory_job (cognitive 77) scripts/ci/ws12_workflow_contracts.py:596— ws12_workflow_contracts.validate_libsql_scripted_memory_job has cognitive complexity 77 (threshold 15). Drivers by points: if/else 46 (63 pts), loops 5 (7 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa._wait_for_slack_delivery_marker (cognitive 77) scripts/reborn_webui_v2_live_qa/run_live_qa.py:3924— run_live_qa._wait_for_slack_delivery_marker has cognitive complexity 77 (threshold 15). Drivers by points: if/else 14 (47 pts), boolean chains 12, error handling 2 (10 pts), loops 3 (8 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa._slack_delivery_routine_case (cognitive 77) scripts/reborn_webui_v2_live_qa/run_live_qa.py:5657— run_live_qa._slack_delivery_routine_case has cognitive complexity 77 (threshold 15). Drivers by points: if/else 29 (53 pts), boolean chains 15, error handling 3 (5 pts), loops 2 (4 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
configure-modal.ConfigureModal (cognitive 70) crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx:44— configure-modal.ConfigureModal has cognitive complexity 70 (threshold 15). Drivers by points: boolean chains 34, if/else 18 (20 pts), ternaries 8 (15 pts), loops 1 (nesting depth added 9). Of this number, 33 points are the body's own statements and 37 belong to 11 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LoopRuntimeContext::render_model_content (cognitive 64) crates/contracts/ironclaw_loop_contracts/src/runtime_context.rs:157— LoopRuntimeContext::render_model_content has cognitive complexity 64 (threshold 15). Drivers by points: if/else 21 (50 pts), loops 2 (6 pts), match/switch 3 (5 pts), boolean chains 3 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useHistory.useHistory (cognitive 64) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useHistory.ts:75— useHistory.useHistory has cognitive complexity 64 (threshold 15). Drivers by points: boolean chains 36, if/else 15 (17 pts), ternaries 8 (10 pts), error handling 1 (nesting depth added 4). Most of this is not in the body itself: 15 of the 64 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 123, 218, 322, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
chat.Chat (cognitive 64) crates/product/ironclaw_webui/frontend/src/pages/chat/chat.tsx:106— chat.Chat has cognitive complexity 64 (threshold 15). Drivers by points: boolean chains 34, if/else 18 (19 pts), ternaries 7 (10 pts), error handling 1 (nesting depth added 4). Of this number, 34 points are the body's own statements and 30 belong to 11 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
run_live_qa._current_turn_capability_evidence (cognitive 63) scripts/reborn_webui_v2_live_qa/run_live_qa.py:4493— run_live_qa._current_turn_capability_evidence has cognitive complexity 63 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 13, error handling 6 (11 pts), ternaries 5 (10 pts), loops 3 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
select-menu.SelectMenu (cognitive 59) crates/product/ironclaw_webui/frontend/src/design-system/select-menu.tsx:229— select-menu.SelectMenu has cognitive complexity 59 (threshold 15). Drivers by points: boolean chains 23, if/else 20 (22 pts), ternaries 11 (14 pts) (nesting depth added 5). Of this number, 22 points are the body's own statements and 37 belong to 11 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
model-selection-policy-editor.ModelSelectionPolicyEditor (cognitive 57) crates/product/ironclaw_webui/frontend/src/pages/settings/components/model-selection-policy-editor.tsx:53— model-selection-policy-editor.ModelSelectionPolicyEditor has cognitive complexity 57 (threshold 15). Drivers by points: boolean chains 24, if/else 13 (16 pts), ternaries 12 (15 pts), error handling 2 (nesting depth added 6). Of this number, 16 points are the body's own statements and 41 belong to 10 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
DefaultExecutorPipeline::execute (cognitive 56) crates/loop/ironclaw_agent_loop/src/executor/canonical.rs:17— DefaultExecutorPipeline::execute has cognitive complexity 56 (threshold 15). Drivers by points: match/switch 16 (44 pts), if/else 3 (11 pts), loops 1 (nesting depth added 36). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
inspector-activity.reduceInspectorActivity (cognitive 56) crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/inspector-activity.ts:167— inspector-activity.reduceInspectorActivity has cognitive complexity 56 (threshold 15). Drivers by points: if/else 17 (26 pts), ternaries 10 (17 pts), boolean chains 9, loops 3 (4 pts) (nesting depth added 17). Of this number, 29 points are the body's own statements and 27 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeliveryCoordinator::drive_prepared (cognitive 53) crates/product/ironclaw_assistant/src/delivery_coordinator.rs:837— DeliveryCoordinator::drive_prepared has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (33 pts), match/switch 4 (9 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChannelDescriptor::validate (cognitive 52) crates/contracts/ironclaw_extension_contracts/src/channel.rs:353— ChannelDescriptor::validate has cognitive complexity 52 (threshold 15). Drivers by points: if/else 17 (32 pts), boolean chains 10, loops 5 (8 pts), match/switch 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ModelStage::process (cognitive 52) crates/loop/ironclaw_agent_loop/src/executor/model.rs:58— ModelStage::process has cognitive complexity 52 (threshold 15). Drivers by points: if/else 9 (26 pts), match/switch 12 (23 pts), boolean chains 2, loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
notify_slack.slack_payload (cognitive 52) scripts/live-canary/notify_slack.py:1013— notify_slack.slack_payload has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (33 pts), boolean chains 10, ternaries 2 (5 pts), loops 2 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useExtensions.useOauthSetup (cognitive 52) crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts:463— useExtensions.useOauthSetup has cognitive complexity 52 (threshold 15). Drivers by points: if/else 31 (36 pts), boolean chains 15, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 0 of the 52 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 514, 681, 600, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
RebornProductAuthServices::handle_oauth_callback_with_optional_provider_identity_check (cognitive 50) crates/domains/ironclaw_auth/src/product_auth/api/auth.rs:1212— RebornProductAuthServices::handle_oauth_callback_with_optional_provider_identity_check has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (38 pts), match/switch 5 (12 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
provider-card.ProviderCard (cognitive 50) crates/product/ironclaw_webui/frontend/src/pages/settings/components/provider-card.tsx:17— provider-card.ProviderCard has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 20 (26 pts), boolean chains 24 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
critical_mutation_gate.load_manifest (cognitive 48) scripts/ci/critical_mutation_gate.py:108— critical_mutation_gate.load_manifest has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 9, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
notify_slack.parse_reborn_qa_case_reports (cognitive 48) scripts/live-canary/notify_slack.py:415— notify_slack.parse_reborn_qa_case_reports has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 10, error handling 3 (6 pts), loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
slack_helpers._slack_personal_auth_preflight (cognitive 48) REDACTED:912— slack_helpers._slack_personal_auth_preflight has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (20 pts), ternaries 6 (12 pts), boolean chains 9, error handling 3 (6 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
device-link-panel.DeviceLinkPanel (cognitive 48) crates/product/ironclaw_webui/frontend/src/components/device-link-panel.tsx:90— device-link-panel.DeviceLinkPanel has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 24, if/else 17, ternaries 3 (4 pts), error handling 3 (nesting depth added 1). Of this number, 19 points are the body's own statements and 29 belong to 10 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
useSSE.useSSE (cognitive 48) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useSSE.ts:117— useSSE.useSSE has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 25, if/else 22, ternaries 1. Most of this is not in the body itself: 0 of the 48 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 131, 374, 203, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
message-list.MessageList (cognitive 47) crates/product/ironclaw_webui/frontend/src/pages/chat/components/message-list.tsx:123— message-list.MessageList has cognitive complexity 47 (threshold 15). Drivers by points: if/else 29 (30 pts), boolean chains 12, ternaries 3 (4 pts), error handling 1 (nesting depth added 2). Most of this is not in the body itself: 3 of the 47 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 211, 315, 270, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
check-target-tree.parse_tree (cognitive 46) scripts/ci/check-target-tree.py:164— check-target-tree.parse_tree has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (35 pts), ternaries 3 (9 pts), boolean chains 1, loops 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reborn_changed_coverage.load_manifest (cognitive 46) scripts/ci/reborn_changed_coverage.py:307— reborn_changed_coverage.load_manifest has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (31 pts), loops 5 (8 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
notify_slack.main (cognitive 45) scripts/live-canary/notify_slack.py:1611— notify_slack.main has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 9, error handling 3 (7 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa._slack_membership_view (cognitive 45) scripts/reborn_webui_v2_live_qa/run_live_qa.py:7169— run_live_qa._slack_membership_view has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (27 pts), boolean chains 12, loops 4 (6 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useChatEvents.useChatEvents (cognitive 45) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:67— useChatEvents.useChatEvents has cognitive complexity 45 (threshold 15). Drivers by points: boolean chains 22, if/else 11 (19 pts), ternaries 1 (3 pts), match/switch 1 (nesting depth added 10). Most of this is not in the body itself: 1 of the 45 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 88, 148). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
notify_slack.parse_results_json (cognitive 44) scripts/live-canary/notify_slack.py:223— notify_slack.parse_results_json has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 2 (6 pts), boolean chains 4, error handling 1 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
logs-page.LogsPage (cognitive 44) crates/product/ironclaw_webui/frontend/src/pages/logs/logs-page.tsx:121— logs-page.LogsPage has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 15 (30 pts), boolean chains 13, if/else 1 (nesting depth added 15). Of this number, 41 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check-reborn-branch-coverage-flags.main (cognitive 43) scripts/ci/check-reborn-branch-coverage-flags.py:26— check-reborn-branch-coverage-flags.main has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (36 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa._slack_correctness_chat_reply (cognitive 43) scripts/reborn_webui_v2_live_qa/run_live_qa.py:7676— run_live_qa._slack_correctness_chat_reply has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 11, ternaries 3 (6 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
workspace-tree.WorkspaceTree (cognitive 43) crates/product/ironclaw_webui/frontend/src/pages/workspace/components/workspace-tree.tsx:293— workspace-tree.WorkspaceTree has cognitive complexity 43 (threshold 15). Drivers by points: if/else 24 (29 pts), boolean chains 7, ternaries 4 (7 pts) (nesting depth added 8). Most of this is not in the body itself: 3 of the 43 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 375, 336, 433, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
InMemoryAuthProductServices::cleanup_for_lifecycle (cognitive 42) crates/domains/ironclaw_auth/src/fakes.rs:1380— InMemoryAuthProductServices::cleanup_for_lifecycle has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 8, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useExtensions.useExtensions (cognitive 42) crates/product/ironclaw_webui/frontend/src/pages/extensions/hooks/useExtensions.ts:174— useExtensions.useExtensions has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 25, if/else 13 (16 pts), ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 9 of the 42 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 225, 263, 277, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
settings-field.SettingsField (cognitive 42) crates/product/ironclaw_webui/frontend/src/pages/settings/components/settings-field.tsx:21— settings-field.SettingsField has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 12 (26 pts), if/else 7 (9 pts), boolean chains 7 (nesting depth added 16). Of this number, 27 points are the body's own statements and 15 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ServeCommand::execute (cognitive 41) crates/app/ironclaw_cli/src/commands/serve.rs:120— ServeCommand::execute has cognitive complexity 41 (threshold 15). Drivers by points: if/else 36 (37 pts), match/switch 2, boolean chains 1, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ProductRuntimeProjectionStream::forward_subscription (cognitive 41) crates/product/ironclaw_assistant/src/projection.rs:478— ProductRuntimeProjectionStream::forward_subscription has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (29 pts), match/switch 5 (10 pts), boolean chains 1, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reborn_changed_coverage.mechanically_uninstrumentable_lines (cognitive 41) scripts/ci/reborn_changed_coverage.py:626— reborn_changed_coverage.mechanically_uninstrumentable_lines has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (38 pts), boolean chains 2, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
google_auth_helpers._google_runtime_access_token (cognitive 41) scripts/reborn_webui_v2_live_qa/google_auth_helpers.py:403— google_auth_helpers._google_runtime_access_token has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 16, error handling 2 (4 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PredicateEvaluator::evaluate_at (cognitive 40) crates/loop/ironclaw_hooks/src/evaluator.rs:151— PredicateEvaluator::evaluate_at has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (28 pts), match/switch 5 (12 pts) (nesting depth added 22). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
OperatorLogBuffer::query (cognitive 40) crates/product/ironclaw_operator/src/operator_logs.rs:382— OperatorLogBuffer::query has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 3 (6 pts), boolean chains 3, match/switch 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check-guidance._reference_lines (cognitive 40) scripts/ci/check-guidance.py:539— check-guidance._reference_lines has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (36 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
notify_slack._markdown_reborn_case_lines (cognitive 40) scripts/live-canary/notify_slack.py:1190— notify_slack._markdown_reborn_case_lines has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (27 pts), ternaries 2 (6 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
extension-card.ExtensionCard (cognitive 40) crates/product/ironclaw_webui/frontend/src/pages/extensions/components/extension-card.tsx:148— extension-card.ExtensionCard has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 21, ternaries 9 (16 pts), if/else 3 (nesting depth added 7). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CapabilityDeclV2::from_raw (cognitive 39) crates/extensions/ironclaw_extension_registry/src/v2.rs:1193— CapabilityDeclV2::from_raw has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 6, loops 4, match/switch 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TelegramChannelAdapter::send (cognitive 39) crates/extensions/packages/telegram/src/channel.rs:271— TelegramChannelAdapter::send has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 4 (12 pts), loops 3 (7 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check-target-tree.compare (cognitive 39) scripts/ci/check-target-tree.py:280— check-target-tree.compare has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (26 pts), ternaries 2 (7 pts), loops 4, boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
notify_slack.github_comment_body (cognitive 39) scripts/live-canary/notify_slack.py:1248— notify_slack.github_comment_body has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (31 pts), loops 3 (6 pts), ternaries 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RebornLoopDriverHostFactory::build_text_only_host_with_capabilities (cognitive 38) crates/loop/ironclaw_turn_runner/src/loop_driver_host.rs:1591— RebornLoopDriverHostFactory::build_text_only_host_with_capabilities has cognitive complexity 38 (threshold 15). Drivers by points: if/else 22 (27 pts), match/switch 7, boolean chains 4 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
run_live_qa._apply_extension_setup_api_after_start (cognitive 38) scripts/reborn_webui_v2_live_qa/run_live_qa.py:1136— run_live_qa._apply_extension_setup_api_after_start has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 8, ternaries 2 (4 pts), loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
user-detail.UserDetailView (cognitive 38) crates/product/ironclaw_webui/frontend/src/pages/admin/components/user-detail.tsx:47— user-detail.UserDetailView has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 16, if/else 12, ternaries 4 (6 pts), error handling 3 (4 pts) (nesting depth added 3). Of this number, 21 points are the body's own statements and 17 belong to 7 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
google_auth_helpers._google_product_auth_preflight (cognitive 37) scripts/reborn_webui_v2_live_qa/google_auth_helpers.py:531— google_auth_helpers._google_product_auth_preflight has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 10, ternaries 2 (4 pts), error handling 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa._slack_personal_dm_counterpart_names (cognitive 37) scripts/reborn_webui_v2_live_qa/run_live_qa.py:3409— run_live_qa._slack_personal_dm_counterpart_names has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 9, loops 3 (4 pts), ternaries 2 (3 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useInspector.useInspector (cognitive 37) crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/useInspector.ts:137— useInspector.useInspector has cognitive complexity 37 (threshold 15). Drivers by points: if/else 22 (23 pts), boolean chains 9, ternaries 5 (nesting depth added 1). Most of this is not in the body itself: 0 of the 37 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 249, 227, 194, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
useLogs.useLogs (cognitive 37) crates/product/ironclaw_webui/frontend/src/pages/logs/hooks/useLogs.ts:92— useLogs.useLogs has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 10, ternaries 5 (8 pts), error handling 2 (nesting depth added 6). Most of this is not in the body itself: 8 of the 37 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 187, 154, 230, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
LibSqlTriggerRepository::run_migrations (cognitive 36) crates/domains/ironclaw_triggers/src/libsql.rs:92— LibSqlTriggerRepository::run_migrations has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 8, loops 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HostRuntimeLoopCapabilityPort::invoke_capability_dispatch (cognitive 36) crates/loop/ironclaw_loop_host/src/capability_port.rs:2444— HostRuntimeLoopCapabilityPort::invoke_capability_dispatch has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (23 pts), match/switch 9 (11 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SubagentSpawnCapabilityPort::invoke_capability_batch (cognitive 36) crates/loop/ironclaw_loop_host/src/subagent_spawn_port.rs:1278— SubagentSpawnCapabilityPort::invoke_capability_batch has cognitive complexity 36 (threshold 15). Drivers by points: match/switch 5 (15 pts), if/else 7 (14 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
changed_workspace_packages.classify_clippy_scope (cognitive 36) scripts/ci/changed_workspace_packages.py:114— changed_workspace_packages.classify_clippy_scope has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 7, ternaries 4 (7 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
audit_surface_inventory._api_keywords (cognitive 36) scripts/reborn_qa_matrix/audit_surface_inventory.py:126— audit_surface_inventory._api_keywords has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 17 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ScriptedDriver::op_for_request (cognitive 35) tools/ironclaw_stress/src/scripted.rs:962— ScriptedDriver::op_for_request has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 5 (9 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa.parse_case_llm_trace_metrics (cognitive 35) scripts/reborn_webui_v2_live_qa/run_live_qa.py:799— run_live_qa.parse_case_llm_trace_metrics has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (23 pts), ternaries 6, boolean chains 4, error handling 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pairing-web-code-panel.PairingWebCodePanel (cognitive 35) crates/product/ironclaw_webui/frontend/src/components/pairing-web-code-panel.tsx:37— pairing-web-code-panel.PairingWebCodePanel has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 12, error handling 5, ternaries 3 (4 pts) (nesting depth added 2). Most of this is not in the body itself: 11 of the 35 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 88, 152, 119, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
HookDispatcher::dispatch_before_capability (cognitive 34) crates/loop/ironclaw_hooks/src/dispatch/mod.rs:1106— HookDispatcher::dispatch_before_capability has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (25 pts), match/switch 2 (5 pts), boolean chains 3, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_filesystem::cas::cas_update_loop (cognitive 34) crates/substrates/ironclaw_filesystem/src/cas.rs:351— ironclaw_filesystem::cas::cas_update_loop has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 5 (13 pts), boolean chains 3, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LeakDetector::scan (cognitive 34) crates/substrates/ironclaw_safety/src/leak_detector.rs:243— LeakDetector::scan has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 5 (10 pts), boolean chains 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ws12_workflow_contracts.validate_crate_scope_filters (cognitive 34) scripts/ci/ws12_workflow_contracts.py:1537— ws12_workflow_contracts.validate_crate_scope_filters has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 3 (7 pts), loops 4 (7 pts), ternaries 1 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_memory::service::bounded_search_excerpts (cognitive 33) crates/domains/ironclaw_memory/src/service.rs:771— ironclaw_memory::service::bounded_search_excerpts has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 5 (9 pts), boolean chains 6 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExtensionHostLifecycleProductService::execute_action (cognitive 33) crates/extensions/ironclaw_extension_manager/src/lifecycle_product_service.rs:92— ExtensionHostLifecycleProductService::execute_action has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (28 pts), match/switch 2 (5 pts) (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FilesystemSkillBundleSource::list_skill_bundle_files (cognitive 33) crates/loop/ironclaw_loop_host/src/filesystem_skill_bundle_source.rs:468— FilesystemSkillBundleSource::list_skill_bundle_files has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (25 pts), match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LibSqlRootFilesystem::ensure_index (cognitive 33) REDACTED:433— LibSqlRootFilesystem::ensure_index has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 5, match/switch 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check-guidance.extract_references (cognitive 33) scripts/ci/check-guidance.py:667— check-guidance.extract_references has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 4 (8 pts), boolean chains 5 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
notify_slack.create_canary_issues (cognitive 33) scripts/live-canary/notify_slack.py:1455— notify_slack.create_canary_issues has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (22 pts), error handling 2 (4 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
custom-mcp-registration-modal.CustomMcpRegistrationModal (cognitive 33) crates/product/ironclaw_webui/frontend/src/pages/extensions/components/custom-mcp-registration-modal.tsx:91— custom-mcp-registration-modal.CustomMcpRegistrationModal has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 16 (25 pts), boolean chains 5, if/else 3 (nesting depth added 9). Of this number, 28 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reborn_coverage_lcov.aggregate (cognitive 32) scripts/ci/lib/reborn_coverage_lcov.py:207— reborn_coverage_lcov.aggregate has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (18 pts), ternaries 2 (8 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
run_live_qa.prepare_reborn_home (cognitive 32) scripts/reborn_webui_v2_live_qa/run_live_qa.py:506— run_live_qa.prepare_reborn_home has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 9, ternaries 2 (3 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
useHistory.insertPreservedAtOriginalPositions (cognitive 32) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useHistory.ts:736— useHistory.insertPreservedAtOriginalPositions has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 5 (7 pts), boolean chains 5 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SlackChannelAdapter::send (cognitive 31) crates/extensions/packages/slack/src/channel.rs:134— SlackChannelAdapter::send has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 3 (7 pts), match/switch 3 (6 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_authorization::obligations_for_grant (cognitive 31) crates/kernel/ironclaw_authorization/src/lib.rs:1063— ironclaw_authorization::obligations_for_grant has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (21 pts), match/switch 2 (6 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_canary.send_reborn_browser_message (cognitive 31) scripts/auth_live_canary/run_live_canary.py:459— run_live_canary.send_reborn_browser_message has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (18 pts), error handling 1 (5 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
notify_slack.parse_reborn_trace_tool_calls (cognitive 31) scripts/live-canary/notify_slack.py:356— notify_slack.parse_reborn_trace_tool_calls has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 5, loops 3, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crm_tracker.run (cognitive 31) scripts/workflow_canary/scenarios/crm_tracker.py:120— crm_tracker.run has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (7 pts), boolean chains 5, ternaries 3 (4 pts), error handling 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
history-messages.messagesFromTimeline (cognitive 31) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/history-messages.ts:57— history-messages.messagesFromTimeline has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 9, ternaries 2 (4 pts), loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
product-activity-envelope.publishProductInspectorEnvelope (cognitive 31) crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/product-activity-envelope.ts:123— product-activity-envelope.publishProductInspectorEnvelope has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 10, loops 2 (4 pts), ternaries 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
automations-presenters.scheduleLabel (cognitive 31) crates/product/ironclaw_webui/frontend/src/pages/automations/lib/automations-presenters.ts:129— automations-presenters.scheduleLabel has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 9, ternaries 4 (5 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
TriggerPollerWorker::clear_terminal_active_fires (cognitive 30) crates/domains/ironclaw_triggers/src/worker/active_cleanup.rs:21— TriggerPollerWorker::clear_terminal_active_fires has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 4 (9 pts), loops 2, boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check-guidance.parse_frontmatter_paths (cognitive 30) scripts/ci/check-guidance.py:826— check-guidance.parse_frontmatter_paths has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProjectScopedAttachmentLander::cleanup_stale (cognitive 29) crates/domains/ironclaw_attachments/src/project_scoped.rs:124— ProjectScopedAttachmentLander::cleanup_stale has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 3 (6 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HostRuntimeServices::validate_production_wiring (cognitive 29) crates/kernel/ironclaw_host_runtime/src/services/production_services.rs:21— HostRuntimeServices::validate_production_wiring has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
useLlmProviders.useLlmProviders (cognitive 29) crates/product/ironclaw_webui/frontend/src/pages/settings/hooks/useLlmProviders.ts:68— useLlmProviders.useLlmProviders has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 16, ternaries 6 (7 pts), if/else 6 (nesting depth added 1). Most of this is not in the body itself: 11 of the 29 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 152, 120, 131). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
user-model-preference-selector.UserModelPreferenceSelector (cognitive 29) crates/product/ironclaw_webui/frontend/src/pages/settings/components/user-model-preference-selector.tsx:19— user-model-preference-selector.UserModelPreferenceSelector has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 8 (22 pts), boolean chains 6, if/else 1 (nesting depth added 14). Of this number, 27 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
users-tab.AdminUsersTabView (cognitive 29) crates/product/ironclaw_webui/frontend/src/pages/admin/components/users-tab.tsx:223— users-tab.AdminUsersTabView has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 17, if/else 6, error handling 3, ternaries 3. Of this number, 16 points are the body's own statements and 13 belong to 7 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ironclaw_extension_manager::ironhub::catalog::validate_manifest_artifacts (cognitive 28) crates/extensions/ironclaw_extension_manager/src/ironhub/catalog.rs:291— ironclaw_extension_manager::ironhub::catalog::validate_manifest_artifacts has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 5 (8 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HookedLoopCapabilityPort::invoke_capability_batch (cognitive 28) crates/loop/ironclaw_hooks/src/middleware/capability_port.rs:326— HookedLoopCapabilityPort::invoke_capability_batch has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 4 (8 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useAdminUsers.useAdminUsers (cognitive 28) crates/product/ironclaw_webui/frontend/src/pages/admin/hooks/useAdminUsers.ts:57— useAdminUsers.useAdminUsers has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 14, if/else 10, ternaries 3 (4 pts) (nesting depth added 1). Most of this is not in the body itself: 8 of the 28 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 96, 119, 166, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Code.highlight (cognitive 28) docs/internal/architecture-video/src/components/Code.tsx:7— Code.highlight has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (10 pts), boolean chains 5 (nesting depth added 12). Most of this is not in the body itself: 0 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 27). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
ReplayEventProjectionService::fold_runtime_prefix (cognitive 27) crates/events/ironclaw_event_projections/src/lib.rs:856— ReplayEventProjectionService::fold_runtime_prefix has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_resources::filesystem_governor::journal::run_delta_journal_flusher (cognitive 27) crates/kernel/ironclaw_resources/src/filesystem_governor/journal.rs:437— ironclaw_resources::filesystem_governor::journal::run_delta_journal_flusher has cognitive complexity 27 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 4 (10 pts), match/switch 3 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HookManifestEntry::validate (cognitive 27) crates/loop/ironclaw_hooks/src/manifest.rs:223— HookManifestEntry::validate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 3 (8 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reborn_changed_coverage.parse_diff (cognitive 27) scripts/ci/reborn_changed_coverage.py:442— reborn_changed_coverage.parse_diff has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 2 (6 pts), boolean chains 5, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_benchmark.async_main (cognitive 27) scripts/tool_discovery_benchmark/run_benchmark.py:802— run_benchmark.async_main has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (10 pts), boolean chains 5, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
skills-tab.SkillsTab (cognitive 27) crates/product/ironclaw_webui/frontend/src/pages/settings/components/skills-tab.tsx:14— skills-tab.SkillsTab has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 10, error handling 4 (nesting depth added 1). Most of this is not in the body itself: 7 of the 27 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 36, 54, 77, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
useThreadScrape.useThreadScrape (cognitive 27) crates/product/ironclaw_webui/frontend/src/pages/admin/hooks/useThreadScrape.ts:70— useThreadScrape.useThreadScrape has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 5, ternaries 2 (3 pts), error handling 2 (nesting depth added 3). Most of this is not in the body itself: 0 of the 27 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 177, 209, 133, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
NativeMemoryService::write (cognitive 26) crates/extensions/packages/memory-native/src/service.rs:206— NativeMemoryService::write has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (23 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Layout::write_wrapped (cognitive 26) crates/substrates/ironclaw_documents/src/html_pdf.rs:559— Layout::write_wrapped has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 5 (8 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check-guidance.load_tracked (cognitive 26) scripts/ci/check-guidance.py:284— check-guidance.load_tracked has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 5 (8 pts), loops 4 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ws12_workflow_contracts.validate_webui_frontend_sites (cognitive 26) scripts/ci/ws12_workflow_contracts.py:1689— ws12_workflow_contracts.validate_webui_frontend_sites has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (3 pts), boolean chains 1, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
emit_results_json.parse_log (cognitive 26) scripts/live-canary/emit_results_json.py:170— emit_results_json.parse_log has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
auth_registry.configured_seeded_cases (cognitive 26) scripts/live_canary/auth_registry.py:214— auth_registry.configured_seeded_cases has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa._extension_setup_submission (cognitive 26) scripts/reborn_webui_v2_live_qa/run_live_qa.py:994— run_live_qa._extension_setup_submission has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (4 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa._model_delivery_summary (cognitive 26) scripts/reborn_webui_v2_live_qa/run_live_qa.py:2841— run_live_qa._model_delivery_summary has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6, error handling 2 (3 pts), loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa._trigger_run_slack_send_evidence (cognitive 26) scripts/reborn_webui_v2_live_qa/run_live_qa.py:3685— run_live_qa._trigger_run_slack_send_evidence has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 7, error handling 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
calendar_prep.run (cognitive 26) scripts/workflow_canary/scenarios/calendar_prep.py:80— calendar_prep.run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6, loops 2 (5 pts), ternaries 2 (3 pts), error handling 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
notification-panel.NotificationPanel (cognitive 26) crates/product/ironclaw_webui/frontend/src/components/notification-panel.tsx:88— notification-panel.NotificationPanel has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 10, ternaries 5 (9 pts), if/else 7 (nesting depth added 4). Of this number, 14 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useProviderDialogForm.useProviderDialogForm (cognitive 26) crates/product/ironclaw_webui/frontend/src/pages/settings/hooks/useProviderDialogForm.ts:22— useProviderDialogForm.useProviderDialogForm has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 9, error handling 3, ternaries 2 (nesting depth added 1). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 105, 63, 89, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ProductAdapterSection::validate (cognitive 25) crates/contracts/ironclaw_extension_contracts/src/product_adapter_section.rs:182— ProductAdapterSection::validate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 4 (5 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_telegram_extension::payload::extract_first_matching_bot_command (cognitive 25) crates/extensions/packages/telegram/src/payload.rs:471— ironclaw_telegram_extension::payload::extract_first_matching_bot_command has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpenAiCompatRefStore::reserve_with_cas (cognitive 25) crates/product/ironclaw_openai_compat/src/refs_storage.rs:177— OpenAiCompatRefStore::reserve_with_cas has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (17 pts), match/switch 3 (7 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
markdown-renderer.MarkdownRendererImpl (cognitive 25) crates/product/ironclaw_webui/frontend/src/pages/chat/components/markdown-renderer.tsx:163— markdown-renderer.MarkdownRendererImpl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11, boolean chains 9, ternaries 4 (5 pts) (nesting depth added 1). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 186, 261, 251, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
tool-activity.ToolDetailPanel (cognitive 25) crates/product/ironclaw_webui/frontend/src/pages/chat/components/tool-activity.tsx:223— tool-activity.ToolDetailPanel has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 9 (15 pts), boolean chains 5, if/else 5 (nesting depth added 6). Of this number, 14 points are the body's own statements and 11 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tool-activity-state.mergeToolActivity (cognitive 25) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/tool-activity-state.ts:136— tool-activity-state.mergeToolActivity has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 18, ternaries 6, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
RefreshingCapabilityPort::build_inner (cognitive 24) crates/app/ironclaw_composition/src/runtime/capability_host/refreshing_capability_port.rs:185— RefreshingCapabilityPort::build_inner has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 6 (8 pts), match/switch 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FailoverProvider::try_providers (cognitive 24) crates/domains/ironclaw_llm/src/failover.rs:230— FailoverProvider::try_providers has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 2 (4 pts), loops 2, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilesystemDurableAuditLog::read_after_cursor (cognitive 24) crates/events/ironclaw_event_store/src/durable_log.rs:395— FilesystemDurableAuditLog::read_after_cursor has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (FilesystemDurableEventLog::read_after_cursor) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ironclaw_event_streams::manager::forward_subscription_items (cognitive 24) crates/events/ironclaw_event_streams/src/manager.rs:495— ironclaw_event_streams::manager::forward_subscription_items has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 4 (10 pts), loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SearchDocumentBuilder::collect_schema (cognitive 24) crates/loop/ironclaw_loop_host/src/tool_search.rs:312— SearchDocumentBuilder::collect_schema has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 3 (4 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
notify_slack._format_reborn_metric_summary (cognitive 24) scripts/live-canary/notify_slack.py:787— notify_slack._format_reborn_metric_summary has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 3 (5 pts), loops 3 (4 pts), error handling 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa._slack_delivery_channel_id (cognitive 24) scripts/reborn_webui_v2_live_qa/run_live_qa.py:3516— run_live_qa._slack_delivery_channel_id has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 4, error handling 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa._resolve_slack_personal_bot_dm_channel (cognitive 24) scripts/reborn_webui_v2_live_qa/run_live_qa.py:7393— run_live_qa._resolve_slack_personal_bot_dm_channel has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 6, ternaries 2 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_common.run_routine_probe (cognitive 24) scripts/workflow_canary/scenarios/_common.py:61— _common.run_routine_probe has cognitive complexity 24 (threshold 15). Drivers by points: if/else 3 (8 pts), boolean chains 6, loops 2 (5 pts), ternaries 2 (3 pts), error handling 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useHistory.mergeFullRefresh (cognitive 24) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useHistory.ts:483— useHistory.mergeFullRefresh has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 10, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 535, 514). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
projects-page.ProjectsPage (cognitive 24) crates/product/ironclaw_webui/frontend/src/pages/projects/projects-page.tsx:14— projects-page.ProjectsPage has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 13, if/else 6 (7 pts), error handling 2, ternaries 2 (nesting depth added 1). Of this number, 14 points are the body's own statements and 10 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
GenericChannelHostAssembly::reconcile (cognitive 23) crates/extensions/ironclaw_extension_host/src/channel_host.rs:555— GenericChannelHostAssembly::reconcile has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 3 (7 pts), loops 4, boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check-type-duplicates.collect (cognitive 23) scripts/check-type-duplicates.py:41— check-type-duplicates.collect has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 3 (6 pts), error handling 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
import-reborn-run-artifact.build_turn (cognitive 23) scripts/import-reborn-run-artifact.py:93— import-reborn-run-artifact.build_turn has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, loops 3 (4 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
google_api_helpers._create_google_spreadsheet_fixture (cognitive 23) scripts/reborn_webui_v2_live_qa/google_api_helpers.py:116— google_api_helpers._create_google_spreadsheet_fixture has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 5 (6 pts), boolean chains 4, error handling 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
slack_helpers._remove_legacy_slack_setup_fields (cognitive 23) REDACTED:321— slack_helpers._remove_legacy_slack_setup_fields has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hn_monitor.run (cognitive 23) scripts/workflow_canary/scenarios/hn_monitor.py:74— hn_monitor.run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (5 pts), boolean chains 4, ternaries 2 (3 pts), error handling 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
attachments.stageFiles (cognitive 23) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/attachments.ts:149— attachments.stageFiles has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 7, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 8). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useHistory.hydrateFreshMessages (cognitive 23) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useHistory.ts:687— useHistory.hydrateFreshMessages has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 9, ternaries 3, loops 1 (nesting depth added 4). Of this number, 14 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
button.Button (cognitive 23) crates/product/ironclaw_webui/frontend/src/design-system/button.tsx:110— button.Button has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, ternaries 9 (11 pts), if/else 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
activity-summary.summarizeActivity (cognitive 23) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/activity-summary.ts:23— activity-summary.summarizeActivity has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 6 (10 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InMemorySessionThreadService::append_tool_result_reference (cognitive 22) crates/domains/ironclaw_threads/src/in_memory.rs:955— InMemorySessionThreadService::append_tool_result_reference has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LiveProjectionPublisher::publish_reply_revision (cognitive 22) crates/product/ironclaw_assistant/src/projection/live_progress.rs:479— LiveProjectionPublisher::publish_reply_revision has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, loops 3, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
dev_metrics.tier1 (cognitive 22) scripts/dev_metrics.py:139— dev_metrics.tier1 has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (7 pts), error handling 2 (5 pts), ternaries 2 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
audit_defect_traceability.build_audit (cognitive 22) scripts/reborn_qa_matrix/audit_defect_traceability.py:77— audit_defect_traceability.build_audit has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
run_smoke.poll_for_reply (cognitive 22) scripts/telegram_smoke/run_smoke.py:121— run_smoke.poll_for_reply has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
manual_trigger.run (cognitive 22) scripts/workflow_canary/scenarios/manual_trigger.py:43— manual_trigger.run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (5 pts), boolean chains 3, ternaries 2 (3 pts), error handling 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
manual_trigger_from_telegram.run (cognitive 22) scripts/workflow_canary/scenarios/manual_trigger_from_telegram.py:84— manual_trigger_from_telegram.run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (5 pts), boolean chains 4, error handling 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
notification-center.NotificationCenter (cognitive 22) crates/product/ironclaw_webui/frontend/src/components/notification-center.tsx:67— notification-center.NotificationCenter has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 13, if/else 7 (8 pts), ternaries 1 (nesting depth added 1). Of this number, 13 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
link-payload-panel.LinkPayloadPanel (cognitive 22) crates/product/ironclaw_webui/frontend/src/components/link-payload-panel.tsx:70— link-payload-panel.LinkPayloadPanel has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 10, error handling 1, ternaries 1. Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 140, 126, 91, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
onboarding-pairing-card.OnboardingPairingCard (cognitive 22) crates/product/ironclaw_webui/frontend/src/pages/chat/components/onboarding-pairing-card.tsx:18— onboarding-pairing-card.OnboardingPairingCard has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 15, if/else 5 (6 pts), error handling 1 (nesting depth added 1). Of this number, 19 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
inspector-panel.InspectorPanelCore (cognitive 22) crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/inspector-panel.tsx:781— inspector-panel.InspectorPanelCore has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, ternaries 8 (9 pts), if/else 4 (nesting depth added 1). Of this number, 15 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
jobs-page.JobsPage (cognitive 22) crates/product/ironclaw_webui/frontend/src/pages/jobs/jobs-page.tsx:23— jobs-page.JobsPage has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (7 pts), error handling 2, ternaries 2 (nesting depth added 1). Of this number, 15 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
automation-detail-panel.AutomationDetailPanel (cognitive 22) crates/product/ironclaw_webui/frontend/src/pages/automations/components/automation-detail-panel.tsx:38— automation-detail-panel.AutomationDetailPanel has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (8 pts), ternaries 5 (nesting depth added 1). Of this number, 14 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
trace-commons-tab.TraceCommonsTab (cognitive 22) crates/product/ironclaw_webui/frontend/src/pages/settings/components/trace-commons-tab.tsx:103— trace-commons-tab.TraceCommonsTab has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 13, if/else 7, ternaries 1 (2 pts) (nesting depth added 1). Of this number, 18 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ProductProjectionItem::validate (cognitive 21) crates/contracts/ironclaw_product_contracts/src/outbound.rs:1052— ProductProjectionItem::validate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
GenericChannelInboundSink::admit (cognitive 21) crates/extensions/ironclaw_extension_host/src/extension_ingress.rs:460— GenericChannelInboundSink::admit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), match/switch 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HostedMcpPreparationService::attempt_hosted_mcp_preparation (cognitive 21) crates/extensions/ironclaw_extension_host/src/hosted_mcp_preparation.rs:419— HostedMcpPreparationService::attempt_hosted_mcp_preparation has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 4 (7 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RailwayPreviewSandboxTransport::shutdown_owned_sandboxes (cognitive 21) crates/lanes/ironclaw_sandbox/src/sandbox_process/railway.rs:603— RailwayPreviewSandboxTransport::shutdown_owned_sandboxes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (15 pts), match/switch 3 (5 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectableSkillContextSource::body_context (cognitive 21) crates/loop/ironclaw_loop_host/src/skill_activation/activation.rs:454— SelectableSkillContextSource::body_context has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UserTurnServices::run_operation_inner (cognitive 21) tools/ironclaw_stress/src/user_turn.rs:1038— UserTurnServices::run_operation_inner has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
auth-oauth-card.AuthOauthCard (cognitive 21) crates/product/ironclaw_webui/frontend/src/pages/chat/components/auth-oauth-card.tsx:60— auth-oauth-card.AuthOauthCard has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 6, ternaries 5, error handling 1. Of this number, 13 points are the body's own statements and 8 belong to 5 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
attachment-preview.AttachmentPreviewModal (cognitive 21) crates/product/ironclaw_webui/frontend/src/pages/chat/components/attachment-preview.tsx:38— attachment-preview.AttachmentPreviewModal has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 8, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 79, 55, 118, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
product-activity-envelope.publishRunStatusActivity (cognitive 21) crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/product-activity-envelope.ts:75— product-activity-envelope.publishRunStatusActivity has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 5, boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useProviderManagementActions.useProviderManagementActions (cognitive 21) crates/product/ironclaw_webui/frontend/src/pages/settings/hooks/useProviderManagementActions.ts:12— useProviderManagementActions.useProviderManagementActions has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 6 (7 pts), boolean chains 4, error handling 2 (nesting depth added 6). Most of this is not in the body itself: 0 of the 21 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 39, 59, 79, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
NotificationChannelsSetHandler::invoke (cognitive 20) crates/app/ironclaw_composition/src/runtime/capability_host/notification_channels_set.rs:100— NotificationChannelsSetHandler::invoke has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 6 (14 pts), if/else 5 (6 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
slack_user_tool::api::humanize_message_text (cognitive 20) crates/extensions/packages/slack/wasm-src/src/api.rs:540— slack_user_tool::api::humanize_message_text has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 4 (13 pts), if/else 4 (6 pts), loops 1 (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
dev_metrics.tier2 (cognitive 20) scripts/dev_metrics.py:192— dev_metrics.tier2 has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 5 (8 pts), loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa.case_qa_5d_slack_strategy_doc_answer (cognitive 20) scripts/reborn_webui_v2_live_qa/run_live_qa.py:5217— run_live_qa.case_qa_5d_slack_strategy_doc_answer has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (3 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa._classify_encoded_mention_messages (cognitive 20) scripts/reborn_webui_v2_live_qa/run_live_qa.py:7537— run_live_qa._classify_encoded_mention_messages has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
message-groups.moveDelayedActivityBeforeAssistantBoundary (cognitive 20) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/message-groups.ts:44— message-groups.moveDelayedActivityBeforeAssistantBoundary has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 3, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useProviderLogin.useProviderLogin (cognitive 20) crates/product/ironclaw_webui/frontend/src/pages/settings/hooks/useProviderLogin.ts:166— useProviderLogin.useProviderLogin has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (12 pts), error handling 5 (6 pts), ternaries 2 (nesting depth added 2). Most of this is not in the body itself: 0 of the 20 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 304, 198, 253, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
project-filesystem-panel.ProjectFilesystemPanel (cognitive 20) crates/product/ironclaw_webui/frontend/src/pages/projects/components/project-filesystem-panel.tsx:40— project-filesystem-panel.ProjectFilesystemPanel has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (10 pts), boolean chains 7, if/else 2, error handling 1 (nesting depth added 5). Of this number, 10 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
user-secrets-panel.UserSecretsPanelView (cognitive 20) crates/product/ironclaw_webui/frontend/src/pages/admin/components/user-secrets-panel.tsx:15— user-secrets-panel.UserSecretsPanelView has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, ternaries 4 (7 pts), if/else 3, error handling 2 (nesting depth added 3). Of this number, 13 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InstructionBundleBuilder::build (cognitive 19) crates/contracts/ironclaw_loop_contracts/src/instruction_bundle.rs:230— InstructionBundleBuilder::build has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 6 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AdminConfigurationService::replace (cognitive 19) crates/extensions/ironclaw_extension_host/src/admin_configuration_service.rs:265— AdminConfigurationService::replace has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GenericChannelOutboundTargetProvider::resolve_reply_target_binding (cognitive 19) crates/extensions/ironclaw_extension_host/src/channel_outbound_targets.rs:396— GenericChannelOutboundTargetProvider::resolve_reply_target_binding has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MemoryBackendFilesystemAdapter::append_file (cognitive 19) crates/extensions/packages/memory-native/src/filesystem.rs:308— MemoryBackendFilesystemAdapter::append_file has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MemoryDocumentFilesystem::append_file (cognitive 19) crates/extensions/packages/memory-native/src/filesystem.rs:710— MemoryDocumentFilesystem::append_file has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
changed_workspace_packages._reverse_dependency_closure (cognitive 19) scripts/ci/changed_workspace_packages.py:43— changed_workspace_packages._reverse_dependency_closure has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reborn_coverage_lcov.load_exemptions (cognitive 19) scripts/ci/lib/reborn_coverage_lcov.py:170— reborn_coverage_lcov.load_exemptions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rust_toolchain_contracts._composite_step_condition (cognitive 19) scripts/ci/lib/rust_toolchain_contracts.py:365— rust_toolchain_contracts._composite_step_condition has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
google_api_helpers._google_drive_file_id_by_name (cognitive 19) scripts/reborn_webui_v2_live_qa/google_api_helpers.py:67— google_api_helpers._google_drive_file_id_by_name has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (5 pts), boolean chains 3, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa._slack_event_run_id_for_message (cognitive 19) scripts/reborn_webui_v2_live_qa/run_live_qa.py:2968— run_live_qa._slack_event_run_id_for_message has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa._slack_workspace_mismatch_error (cognitive 19) scripts/reborn_webui_v2_live_qa/run_live_qa.py:4160— run_live_qa._slack_workspace_mismatch_error has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 6 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tool-activity.summarizeTools (cognitive 19) crates/product/ironclaw_webui/frontend/src/pages/chat/components/tool-activity.tsx:41— tool-activity.summarizeTools has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 4 (8 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
workspace-tree.TreeNode (cognitive 19) crates/product/ironclaw_webui/frontend/src/pages/workspace/components/workspace-tree.tsx:71— workspace-tree.TreeNode has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (11 pts), if/else 3 (5 pts), boolean chains 3 (nesting depth added 6). Of this number, 15 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
workspace-api.readWorkspaceFile (cognitive 19) crates/product/ironclaw_webui/frontend/src/pages/workspace/lib/workspace-api.ts:472— workspace-api.readWorkspaceFile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 9 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
automations-refresh.nextAutomationsRefetchDelay (cognitive 19) crates/product/ironclaw_webui/frontend/src/pages/automations/lib/automations-refresh.ts:26— automations-refresh.nextAutomationsRefetchDelay has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 3 (6 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
skill-card.SkillCard (cognitive 19) crates/product/ironclaw_webui/frontend/src/pages/settings/components/skill-card.tsx:8— skill-card.SkillCard has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 13, ternaries 3, if/else 2, error handling 1. Of this number, 14 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
configuration-tab.ConfigurationGroup (cognitive 19) crates/product/ironclaw_webui/frontend/src/pages/admin/components/configuration-tab.tsx:76— configuration-tab.ConfigurationGroup has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, ternaries 8, error handling 1. Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 141, 94, 128). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
index.render (cognitive 19) docs/internal/archived-skills/portfolio/widget/index.js:70— index.render has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 15, if/else 3, ternaries 1. Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 90, 105, 118). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
StoreApprovalSettingsProvider::tool_override (cognitive 18) crates/app/ironclaw_composition/src/capability_authorization.rs:332— StoreApprovalSettingsProvider::tool_override has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 3 (8 pts), loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_loop_contracts::content_digest::match_iso8601_bytes (cognitive 18) crates/contracts/ironclaw_loop_contracts/src/content_digest.rs:150— ironclaw_loop_contracts::content_digest::match_iso8601_bytes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
RetryProvider::streaming_retry_loop (cognitive 18) crates/domains/ironclaw_llm/src/retry.rs:239— RetryProvider::streaming_retry_loop has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (13 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HostApiContractRegistry::project_manifest (cognitive 18) crates/extensions/ironclaw_extension_registry/src/v2.rs:441— HostApiContractRegistry::project_manifest has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (5 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_turns::loop_exit::completion_kind_ref_violation (cognitive 18) crates/kernel/ironclaw_turns/src/loop_exit.rs:823— ironclaw_turns::loop_exit::completion_kind_ref_violation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 4). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FilesystemHostInputQueue::confirm_flips (cognitive 18) crates/loop/ironclaw_loop_host/src/durable_input_queue.rs:176— FilesystemHostInputQueue::confirm_flips has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 4 (6 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AuthorizedToolSearchIndex::search (cognitive 18) crates/loop/ironclaw_loop_host/src/tool_search.rs:135— AuthorizedToolSearchIndex::search has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultProductSurface::submit_inbound_inner (cognitive 18) crates/product/ironclaw_assistant/src/workflow.rs:337— DefaultProductSurface::submit_inbound_inner has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_latency_runner::main (cognitive 18) harness/latency/runner/src/main.rs:143— ironclaw_latency_runner::main has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (14 pts), if/else 3, match/switch 1 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
changed_workspace_packages.changed_production_packages (cognitive 18) scripts/ci/changed_workspace_packages.py:83— changed_workspace_packages.changed_production_packages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check-guidance._reference_resolves (cognitive 18) scripts/ci/check-guidance.py:736— check-guidance._reference_resolves has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check-guidance.check_references (cognitive 18) scripts/ci/check-guidance.py:766— check-guidance.check_references has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 6 (8 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check-guidance.check_family_tables (cognitive 18) scripts/ci/check-guidance.py:1014— check-guidance.check_family_tables has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smoke-release-binary._validate_bundled_extensions (cognitive 18) scripts/ci/smoke-release-binary.py:118— smoke-release-binary._validate_bundled_extensions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
notify_slack._format_reborn_qa_group (cognitive 18) scripts/live-canary/notify_slack.py:885— notify_slack._format_reborn_qa_group has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
audit_execution_evidence.build_audit (cognitive 18) scripts/reborn_qa_matrix/audit_execution_evidence.py:60— audit_execution_evidence.build_audit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa._trigger_run_outbound_deliver_evidence (cognitive 18) scripts/reborn_webui_v2_live_qa/run_live_qa.py:3791— run_live_qa._trigger_run_outbound_deliver_evidence has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa._capability_run_statuses (cognitive 18) scripts/reborn_webui_v2_live_qa/run_live_qa.py:4434— run_live_qa._capability_run_statuses has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
slack_helpers._seed_generated_slack_product_auth_if_configured (cognitive 18) REDACTED:1060— slack_helpers._seed_generated_slack_product_auth_if_configured has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
history-messages.toolCardFromPreview (cognitive 18) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/history-messages.ts:201— history-messages.toolCardFromPreview has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 15, ternaries 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
auth.useAuthSession (cognitive 18) crates/product/ironclaw_webui/frontend/src/app/auth.ts:132— auth.useAuthSession has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, boolean chains 7, ternaries 2. Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 191, 135, 175, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
approval-card.ApprovalCard (cognitive 18) crates/product/ironclaw_webui/frontend/src/pages/chat/components/approval-card.tsx:39— approval-card.ApprovalCard has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, ternaries 5 (6 pts), if/else 2 (nesting depth added 1). Of this number, 12 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
notification-channels-panel.DevicePushBlock (cognitive 18) crates/product/ironclaw_webui/frontend/src/pages/automations/components/notification-channels-panel.tsx:29— notification-channels-panel.DevicePushBlock has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 6, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
custom-mcp-registration-modal.connectionErrors (cognitive 18) crates/product/ironclaw_webui/frontend/src/pages/extensions/components/custom-mcp-registration-modal.tsx:52— custom-mcp-registration-modal.connectionErrors has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 3 (4 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
thread-scraping-panel.ThreadScrapingPanel (cognitive 18) crates/product/ironclaw_webui/frontend/src/pages/admin/components/thread-scraping-panel.tsx:12— thread-scraping-panel.ThreadScrapingPanel has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 18. Of this number, 16 points are the body's own statements and 2 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ironclaw_host_api::credential_redaction::redact_credential_text (cognitive 17) crates/contracts/ironclaw_host_api/src/credential_redaction.rs:150— ironclaw_host_api::credential_redaction::redact_credential_text has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (9 pts), loops 3 (6 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NotificationInboxStore::publish (cognitive 17) crates/domains/ironclaw_notifications/src/store.rs:150— NotificationInboxStore::publish has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (8 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
RawTraceContribution::from_recorded_trace (cognitive 17) crates/domains/ironclaw_trace_commons/src/contribution/capture.rs:220— RawTraceContribution::from_recorded_trace has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (7 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepositoryMemoryBackend::append_document_with_backend_options (cognitive 17) crates/extensions/packages/memory-native/src/backend.rs:647— RepositoryMemoryBackend::append_document_with_backend_options has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultTurnCoordinator::derive_unbound_submission (cognitive 17) crates/kernel/ironclaw_turns/src/coordinator.rs:272— DefaultTurnCoordinator::derive_unbound_submission has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, match/switch 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HostManagedLoopModelPort::stream_model (cognitive 17) crates/kernel/ironclaw_turns/src/host_managed_ports/model.rs:108— HostManagedLoopModelPort::stream_model has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (3 pts), match/switch 3, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompactionTask::validate_range (cognitive 17) crates/loop/ironclaw_loop_host/src/compaction_task.rs:293— CompactionTask::validate_range has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), match/switch 4 (6 pts), boolean chains 2, loops 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ResultReadHandler::invoke (cognitive 17) crates/loop/ironclaw_loop_host/src/result_read.rs:174— ResultReadHandler::invoke has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 9 (15 pts), boolean chains 1, if/else 1 (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
check-guidance.check_claude_aliases (cognitive 17) scripts/ci/check-guidance.py:1066— check-guidance.check_claude_aliases has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cut_ironclaw_release._manifest_version (cognitive 17) scripts/ci/cut_ironclaw_release.py:183— cut_ironclaw_release._manifest_version has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 3 (4 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
import-reborn-run-artifact.trace_candidate (cognitive 17) scripts/import-reborn-run-artifact.py:225— import-reborn-run-artifact.trace_candidate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
notify_slack.categorize_failures (cognitive 17) scripts/live-canary/notify_slack.py:1381— notify_slack.categorize_failures has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2, loops 2, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
audit_workbook_completeness.build_audit (cognitive 17) scripts/reborn_qa_matrix/audit_workbook_completeness.py:69— audit_workbook_completeness.build_audit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
google_api_helpers._google_sheet_contains_marker (cognitive 17) scripts/reborn_webui_v2_live_qa/google_api_helpers.py:192— google_api_helpers._google_sheet_contains_marker has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (5 pts), loops 2 (3 pts), boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
refresh_google_oauth.refresh_access_token (cognitive 17) scripts/reborn_webui_v2_live_qa/refresh_google_oauth.py:30— refresh_google_oauth.refresh_access_token has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), error handling 4 (5 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa._delivered_gate_routes_for_run (cognitive 17) scripts/reborn_webui_v2_live_qa/run_live_qa.py:2910— run_live_qa._delivered_gate_routes_for_run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, error handling 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa._marker_match_stats (cognitive 17) scripts/reborn_webui_v2_live_qa/run_live_qa.py:3561— run_live_qa._marker_match_stats has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa.case_qa_10f_slack_mention_encoding (cognitive 17) scripts/reborn_webui_v2_live_qa/run_live_qa.py:8365— run_live_qa.case_qa_10f_slack_mention_encoding has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
run_smoke.poll_for_reply (cognitive 17) scripts/slack_smoke/run_smoke.py:102— run_smoke.poll_for_reply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (2 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
routine_visibility_from_telegram.run (cognitive 17) scripts/workflow_canary/scenarios/routine_visibility_from_telegram.py:81— routine_visibility_from_telegram.run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 3, loops 2 (3 pts), ternaries 2, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
telegram_round_trip.run (cognitive 17) scripts/workflow_canary/scenarios/telegram_round_trip.py:65— telegram_round_trip.run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 3, loops 2 (3 pts), ternaries 2, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
api.describeApiError (cognitive 17) crates/product/ironclaw_webui/frontend/src/lib/api.ts:138— api.describeApiError has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 2 (6 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cn.cn (cognitive 17) crates/product/ironclaw_webui/frontend/src/utils/cn.ts:11— cn.cn has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useThreads.useThreads (cognitive 17) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useThreads.ts:16— useThreads.useThreads has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 105, 129, 44, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
page-header.PageHeader (cognitive 17) crates/product/ironclaw_webui/frontend/src/components/page-header.tsx:12— page-header.PageHeader has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 3, boolean chains 2, loops 1 (nesting depth added 5). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 22, 41, 111). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
inspector-panel.PromptShell (cognitive 17) crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/inspector-panel.tsx:101— inspector-panel.PromptShell has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 3 (5 pts), ternaries 2 (nesting depth added 2). Of this number, 16 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
notification-channels-panel.NotificationChannelsPanel (cognitive 17) crates/product/ironclaw_webui/frontend/src/pages/automations/components/notification-channels-panel.tsx:212— notification-channels-panel.NotificationChannelsPanel has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 8, ternaries 1. Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 346, 264, 238, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
extension-card.RegistryCard (cognitive 17) crates/product/ironclaw_webui/frontend/src/pages/extensions/components/extension-card.tsx:351— extension-card.RegistryCard has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (9 pts), boolean chains 8 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
provider-management.ProviderManagement (cognitive 17) crates/product/ironclaw_webui/frontend/src/pages/settings/components/provider-management.tsx:36— provider-management.ProviderManagement has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (8 pts), boolean chains 5, if/else 2 (4 pts) (nesting depth added 5). Of this number, 10 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_common::identity::canonicalize (cognitive 16) crates/contracts/ironclaw_common/src/identity.rs:73— ironclaw_common::identity::canonicalize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ironclaw_product_contracts::interaction_commands::parse_interaction_resolution_text (cognitive 16) crates/contracts/ironclaw_product_contracts/src/interaction_commands.rs:53— ironclaw_product_contracts::interaction_commands::parse_interaction_resolution_text has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OutboundStateStore::sweep_expired_delivered_gate_routes (cognitive 16) crates/domains/ironclaw_outbound/src/outbound_state_store.rs:2214— OutboundStateStore::sweep_expired_delivered_gate_routes has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (9 pts), if/else 3 (6 pts), loops 1 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PolicyEnforcedChannelEgress::approve (cognitive 16) crates/extensions/ironclaw_extension_host/src/egress.rs:138— PolicyEnforcedChannelEgress::approve has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 2, loops 2, match/switch 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GsuiteExecutor::dispatch (cognitive 16) crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:134— GsuiteExecutor::dispatch has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 8 (11 pts), if/else 3 (5 pts) (nesting depth added 5). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ironclaw_approvals::profile_gate::require_approval_for_profile_policy (cognitive 16) crates/kernel/ironclaw_approvals/src/profile_gate.rs:268— ironclaw_approvals::profile_gate::require_approval_for_profile_policy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 4, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HostManagedLoopPromptPort::validate_request (cognitive 16) crates/kernel/ironclaw_turns/src/host_managed_ports/prompt.rs:172— HostManagedLoopPromptPort::validate_request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ToolDisclosureCapabilityPort::invoke_tool_search (cognitive 16) crates/loop/ironclaw_loop_host/src/tool_disclosure_port.rs:1212— ToolDisclosureCapabilityPort::invoke_tool_search has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilesystemIdempotencyLedger::settle (cognitive 16) crates/product/ironclaw_assistant/src/filesystem_ledger.rs:182— FilesystemIdempotencyLedger::settle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PostgresRootFilesystem::ensure_index (cognitive 16) REDACTED:363— PostgresRootFilesystem::ensure_index has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_canary.async_main (cognitive 16) scripts/auth_live_canary/run_live_canary.py:1050— run_live_canary.async_main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
auth_runtime.start_oauth_setup (cognitive 16) scripts/live_canary/auth_runtime.py:257— auth_runtime.start_oauth_setup has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
auth_runtime.select_single_oauth_account (cognitive 16) scripts/live_canary/auth_runtime.py:451— auth_runtime.select_single_oauth_account has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
common.wait_for_port_line (cognitive 16) scripts/live_canary/common.py:207— common.wait_for_port_line has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
report_coverage._print_text (cognitive 16) scripts/reborn_qa_matrix/report_coverage.py:351— report_coverage._print_text has cognitive complexity 16 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 4 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
google_auth_helpers._stored_google_oauth_client_id_from_reborn_home (cognitive 16) scripts/reborn_webui_v2_live_qa/google_auth_helpers.py:146— google_auth_helpers._stored_google_oauth_client_id_from_reborn_home has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (4 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
google_auth_helpers._google_oauth_refresh_probe (cognitive 16) scripts/reborn_webui_v2_live_qa/google_auth_helpers.py:274— google_auth_helpers._google_oauth_refresh_probe has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, error handling 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
run_live_qa._routine_creation_case (cognitive 16) scripts/reborn_webui_v2_live_qa/run_live_qa.py:5531— run_live_qa._routine_creation_case has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_live_qa._wait_for_authored_slack_message (cognitive 16) scripts/reborn_webui_v2_live_qa/run_live_qa.py:7615— run_live_qa._wait_for_authored_slack_message has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_benchmark._trace_metrics (cognitive 16) scripts/tool_discovery_benchmark/run_benchmark.py:534— run_benchmark._trace_metrics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useNotifications.useNotifications (cognitive 16) crates/product/ironclaw_webui/frontend/src/hooks/useNotifications.ts:105— useNotifications.useNotifications has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 6. Of this number, 8 points are the body's own statements and 8 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
sidebar-threads.SidebarThreads (cognitive 16) crates/product/ironclaw_webui/frontend/src/components/sidebar-threads.tsx:237— sidebar-threads.SidebarThreads has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 2 (3 pts), ternaries 2, loops 1 (nesting depth added 1). Of this number, 11 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
provider-dialog.ProviderDialog (cognitive 16) crates/product/ironclaw_webui/frontend/src/pages/settings/components/provider-dialog.tsx:21— provider-dialog.ProviderDialog has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, ternaries 5 (6 pts), if/else 2 (nesting depth added 1). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
registry-tab.RegistryTab (cognitive 16) crates/product/ironclaw_webui/frontend/src/pages/extensions/components/registry-tab.tsx:64— registry-tab.RegistryTab has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 13, ternaries 2, if/else 1. Of this number, 9 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
users-tab.UserRow (cognitive 16) crates/product/ironclaw_webui/frontend/src/pages/admin/components/users-tab.tsx:156— users-tab.UserRow has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 5 (nesting depth added 3). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Near-duplicate member family (4 members, 33 shared lines) · ×1
Near-duplicate member family (4 members, 33 shared lines) crates/extensions/packages/memory-native/src/backend.rs:446— crates/extensions/packages/memory-native/src/backend.rs:446-528 | crates/extensions/packages/memory-native/src/backend.rs:554-645 | crates/extensions/packages/memory-native/src/backend.rs:653-755 | crates/extensions/packages/memory-native/src/backend.rs:764-853 — These 4 members are variants of one another: a block of 33 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 32 shared lines) · ×1
Near-duplicate member family (3 members, 32 shared lines) crates/domains/ironclaw_triggers/src/libsql.rs:1040— crates/domains/ironclaw_triggers/src/libsql.rs:1040-1155 | crates/domains/ironclaw_triggers/src/libsql.rs:1160-1270 | crates/domains/ironclaw_triggers/src/libsql.rs:1275-1349 — These 3 members are variants of one another: a block of 32 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
Near-duplicate member pair (54 shared lines) REDACTED:860— REDACTED:860-1026 | REDACTED:595-737 — These two members are variants of one another: 54 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (47 shared lines) crates/domains/ironclaw_llm/src/openai_codex_session.rs:351— crates/domains/ironclaw_llm/src/openai_codex_session.rs:351-481 | crates/domains/ironclaw_llm/src/openai_codex_session.rs:520-589 — These two members are variants of one another: 47 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (46 shared lines) REDACTED:2905— REDACTED:2905-3013 | REDACTED:2484-2584 — These two members are variants of one another: 46 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (43 shared lines) crates/kernel/ironclaw_resources/src/filesystem_governor.rs:692— crates/kernel/ironclaw_resources/src/filesystem_governor.rs:692-749 | crates/kernel/ironclaw_resources/src/filesystem_governor.rs:776-832 — These two members are variants of one another: 43 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (34 shared lines) crates/loop/ironclaw_agent_loop/src/executor/gates.rs:110— crates/loop/ironclaw_agent_loop/src/executor/gates.rs:110-273 | crates/loop/ironclaw_agent_loop/src/executor/gates.rs:299-386 — These two members are variants of one another: 34 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (29 shared lines) crates/domains/ironclaw_triggers/src/postgres.rs:696— crates/domains/ironclaw_triggers/src/postgres.rs:696-745 | crates/domains/ironclaw_triggers/src/postgres.rs:750-799 — These two members are variants of one another: 29 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (24 shared lines) crates/domains/ironclaw_triggers/src/postgres.rs:567— crates/domains/ironclaw_triggers/src/postgres.rs:567-628 | crates/domains/ironclaw_triggers/src/postgres.rs:633-691 — These two members are variants of one another: 24 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×1
Edited copy of a member (15 corresponding lines) crates/extensions/ironclaw_extension_support/src/latency.rs:110— crates/extensions/ironclaw_extension_support/src/latency.rs:110-133 | crates/extensions/ironclaw_extension_support/src/latency.rs:142-166 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×1
Edited copy of a member (17 corresponding lines) crates/loop/ironclaw_hooks/src/predicate_state.rs:829— crates/loop/ironclaw_hooks/src/predicate_state.rs:829-846 | crates/loop/ironclaw_hooks/src/predicate_state.rs:921-937 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×1
Edited copy of a member (9 corresponding lines) crates/kernel/ironclaw_host_runtime/src/production.rs:64— crates/kernel/ironclaw_host_runtime/src/production.rs:64-79 | crates/kernel/ironclaw_host_runtime/src/production.rs:87-103 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×1
Edited copy of a member (11 corresponding lines) scripts/reborn_qa_matrix/audit_defect_traceability.py:182— scripts/reborn_qa_matrix/audit_defect_traceability.py:182-199 | scripts/reborn_qa_matrix/audit_workbook_completeness.py:149-161 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×1
Edited copy of a member (7 corresponding lines) crates/loop/ironclaw_turn_runner/src/turn_run_executor.rs:68— crates/loop/ironclaw_turn_runner/src/turn_run_executor.rs:68-81 | crates/loop/ironclaw_turn_runner/src/turn_run_executor.rs:88-102 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (55–57 lines × 2) crates/extensions/packages/memory-native/src/backend.rs:565— crates/extensions/packages/memory-native/src/backend.rs:565-619 | crates/extensions/packages/memory-native/src/backend.rs:663-719 — 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.
Duplicated block (48–50 lines × 2) crates/events/ironclaw_event_store/src/durable_log.rs:210— crates/events/ironclaw_event_store/src/durable_log.rs:210-259 | crates/events/ironclaw_event_store/src/durable_log.rs:409-456 — 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.
Duplicated block (45–48 lines × 2) crates/domains/ironclaw_auth/src/fakes.rs:884— crates/domains/ironclaw_auth/src/fakes.rs:884-931 | crates/domains/ironclaw_auth/src/product_auth/durable/accounts.rs:179-223 — before extracting anything, compare `crates/domains/ironclaw_auth/src/fakes.rs` and `crates/domains/ironclaw_auth/src/product_auth/durable/accounts.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (43 lines × 2) crates/extensions/ironclaw_extension_host/src/nearai_mcp.rs:79— crates/extensions/ironclaw_extension_host/src/nearai_mcp.rs:79-121 | crates/product/ironclaw_operator/src/llm_admin/nearai_mcp.rs:129-171 — before extracting anything, compare `crates/extensions/ironclaw_extension_host/src/nearai_mcp.rs` and `crates/product/ironclaw_operator/src/llm_admin/nearai_mcp.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (30–41 lines × 2) crates/extensions/ironclaw_extension_registry/src/installations.rs:3695— crates/extensions/ironclaw_extension_registry/src/installations.rs:3695-3735 | crates/extensions/ironclaw_extension_registry/src/installations.rs:3782-3811 — 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.
Duplicated block (39 lines × 2) crates/product/ironclaw_openai_compat/src/responses_workflow.rs:212— crates/product/ironclaw_openai_compat/src/responses_workflow.rs:212-250 | crates/product/ironclaw_openai_compat/src/responses_workflow.rs:399-437 — 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.
Duplicated block (38 lines × 2) crates/extensions/packages/memory-native/src/filesystem.rs:442— crates/extensions/packages/memory-native/src/filesystem.rs:442-479 | crates/extensions/packages/memory-native/src/filesystem.rs:849-886 — 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.
Duplicated block (37 lines × 4) crates/loop/ironclaw_loop_host/src/model_gateway.rs:432— crates/loop/ironclaw_loop_host/src/model_gateway.rs:432-468 | crates/loop/ironclaw_loop_host/src/model_gateway.rs:490-526 | crates/loop/ironclaw_loop_host/src/model_gateway.rs:548-584 | crates/loop/ironclaw_loop_host/src/model_gateway.rs:611-647 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (31–35 lines × 2) crates/extensions/ironclaw_extension_host/src/channel_delivery.rs:79— crates/extensions/ironclaw_extension_host/src/channel_delivery.rs:79-113 | crates/extensions/ironclaw_extension_host/src/channel_delivery.rs:131-161 — 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.
Duplicated block (24–34 lines × 2) crates/extensions/ironclaw_extension_host/src/extension_ingress.rs:609— crates/extensions/ironclaw_extension_host/src/extension_ingress.rs:609-642 | crates/extensions/packages/telegram/src/linked/mapping.rs:340-363 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (28–32 lines × 2) crates/app/ironclaw_cli/src/first_party/gsuite.rs:160— crates/app/ironclaw_cli/src/first_party/gsuite.rs:160-191 | crates/extensions/ironclaw_extension_host/src/test_support/first_party_registrars.rs:162-189 — before extracting anything, compare `crates/app/ironclaw_cli/src/first_party/gsuite.rs` and `crates/extensions/ironclaw_extension_host/src/test_support/first_party_registrars.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (31–32 lines × 2) REDACTED:2575— REDACTED:2575-2606 | REDACTED:1380-1410 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 318 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (32 lines × 2) tools/ironclaw_stress/src/human.rs:578— tools/ironclaw_stress/src/human.rs:578-609 | tools/ironclaw_stress/src/human.rs:662-693 — 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.
Duplicated block (30 lines × 4) crates/loop/ironclaw_loop_host/src/model_gateway.rs:807— crates/loop/ironclaw_loop_host/src/model_gateway.rs:807-836 | crates/loop/ironclaw_loop_host/src/model_gateway.rs:858-887 | crates/loop/ironclaw_loop_host/src/model_gateway.rs:909-938 | crates/loop/ironclaw_loop_host/src/model_gateway.rs:965-994 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (30 lines × 2) crates/domains/ironclaw_threads/src/filesystem_service.rs:4536— crates/domains/ironclaw_threads/src/filesystem_service.rs:4536-4565 | crates/domains/ironclaw_threads/src/in_memory.rs:1899-1928 — before extracting anything, compare `crates/domains/ironclaw_threads/src/filesystem_service.rs` and `crates/domains/ironclaw_threads/src/in_memory.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (29 lines × 2) crates/events/ironclaw_event_store/src/durable_log.rs:268— crates/events/ironclaw_event_store/src/durable_log.rs:268-296 | crates/events/ironclaw_event_store/src/durable_log.rs:467-495 — 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.
Duplicated block (12–29 lines × 2) REDACTED:624— REDACTED:624-635 | REDACTED:456-484 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 318 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (21–28 lines × 2) crates/loop/ironclaw_hooks/src/predicate_state.rs:639— crates/loop/ironclaw_hooks/src/predicate_state.rs:639-666 | crates/loop/ironclaw_hooks/src/predicate_state.rs:719-739 — 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.
Duplicated block (20–27 lines × 2) crates/extensions/packages/memory-native/src/filesystem.rs:217— crates/extensions/packages/memory-native/src/filesystem.rs:217-243 | crates/extensions/packages/memory-native/src/filesystem.rs:311-330 — 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.
Duplicated block (22–26 lines × 2) crates/domains/ironclaw_auth/src/fakes.rs:419— crates/domains/ironclaw_auth/src/fakes.rs:419-440 | crates/domains/ironclaw_auth/src/fakes.rs:484-509 — 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.
Duplicated block (23–25 lines × 3) crates/extensions/packages/slack/src/channel.rs:428— crates/extensions/packages/slack/src/channel.rs:428-452 | crates/extensions/packages/slack/src/channel.rs:495-517 | crates/extensions/packages/slack/src/channel.rs:574-596 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (21–25 lines × 2) crates/contracts/ironclaw_loop_contracts/src/instruction_bundle.rs:351— crates/contracts/ironclaw_loop_contracts/src/instruction_bundle.rs:351-375 | crates/contracts/ironclaw_loop_contracts/src/instruction_bundle.rs:432-452 — 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.
Duplicated block (23–25 lines × 2) crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:392— crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:392-414 | crates/domains/ironclaw_auth/src/product_auth/durable/flows.rs:457-481 — 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.
Duplicated block (24–25 lines × 2) crates/loop/ironclaw_agent_loop/src/executor/capabilities.rs:131— crates/loop/ironclaw_agent_loop/src/executor/capabilities.rs:131-155 | crates/loop/ironclaw_agent_loop/src/executor/capabilities.rs:432-455 — 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.
Duplicated block (24 lines × 4) crates/domains/ironclaw_llm/src/rig_adapter.rs:1405— crates/domains/ironclaw_llm/src/rig_adapter.rs:1405-1428 | crates/domains/ironclaw_llm/src/rig_adapter.rs:1485-1508 | crates/domains/ironclaw_llm/src/rig_adapter.rs:1561-1584 | crates/domains/ironclaw_llm/src/rig_adapter.rs:1671-1694 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (22–24 lines × 2) crates/domains/ironclaw_conversations/src/memory.rs:974— crates/domains/ironclaw_conversations/src/memory.rs:974-995 | crates/domains/ironclaw_conversations/src/memory.rs:1021-1044 — 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.
Duplicated block (10–24 lines × 2) crates/events/ironclaw_event_store/src/lib.rs:1217— crates/events/ironclaw_event_store/src/lib.rs:1217-1240 | crates/events/ironclaw_event_store/src/lib.rs:1255-1264 — 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.
Duplicated block (19–24 lines × 2) crates/kernel/ironclaw_host_runtime/src/production.rs:552— crates/kernel/ironclaw_host_runtime/src/production.rs:552-570 | crates/kernel/ironclaw_host_runtime/src/production.rs:604-627 — 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.
Duplicated block (21–24 lines × 2) crates/loop/ironclaw_loop_host/src/capability_port.rs:1943— crates/loop/ironclaw_loop_host/src/capability_port.rs:1943-1966 | crates/loop/ironclaw_loop_host/src/synthetic_capability.rs:608-628 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (23–24 lines × 2) tools/ironclaw_stress/src/secret_ops.rs:114— tools/ironclaw_stress/src/secret_ops.rs:114-136 | tools/ironclaw_stress/src/user_turn.rs:343-366 — before extracting anything, compare `tools/ironclaw_stress/src/secret_ops.rs` and `tools/ironclaw_stress/src/user_turn.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (23 lines × 3) crates/kernel/ironclaw_resources/src/filesystem_governor.rs:491— crates/kernel/ironclaw_resources/src/filesystem_governor.rs:491-513 | crates/kernel/ironclaw_resources/src/filesystem_governor.rs:531-553 | crates/kernel/ironclaw_resources/src/filesystem_governor.rs:848-870 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (19–23 lines × 2) crates/loop/ironclaw_hooks/src/predicate_state.rs:602— crates/loop/ironclaw_hooks/src/predicate_state.rs:602-624 | crates/loop/ironclaw_hooks/src/predicate_state.rs:692-710 — 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.
Duplicated block (18–22 lines × 2) crates/domains/ironclaw_auth/src/product_auth/durable/interactions.rs:197— crates/domains/ironclaw_auth/src/product_auth/durable/interactions.rs:197-218 | crates/domains/ironclaw_auth/src/product_auth/durable/interactions.rs:228-245 — 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.
Duplicated block (20–22 lines × 2) crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:326— crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:326-347 | crates/domains/ironclaw_auth/src/product_auth/durable/mod.rs:560-579 — 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.
Duplicated block (10–22 lines × 2) crates/loop/ironclaw_loop_host/src/skill_activation/activation.rs:1773— crates/loop/ironclaw_loop_host/src/skill_activation/activation.rs:1773-1782 | crates/loop/ironclaw_loop_host/src/skill_activation/activation.rs:1821-1842 — 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.
Duplicated block (18–21 lines × 2) crates/domains/ironclaw_llm/src/models.rs:154— crates/domains/ironclaw_llm/src/models.rs:154-171 | crates/domains/ironclaw_llm/src/models.rs:227-247 — 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.
Duplicated block (17–21 lines × 2) crates/loop/ironclaw_agent_loop/src/executor/gates.rs:247— crates/loop/ironclaw_agent_loop/src/executor/gates.rs:247-263 | crates/loop/ironclaw_agent_loop/src/executor/gates.rs:357-377 — 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.
Duplicated block (20 lines × 3) crates/domains/ironclaw_triggers/src/in_memory.rs:533— crates/domains/ironclaw_triggers/src/in_memory.rs:533-552 | crates/domains/ironclaw_triggers/src/in_memory.rs:568-587 | crates/domains/ironclaw_triggers/src/in_memory.rs:602-621 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (18–20 lines × 2) crates/app/ironclaw_cli/src/first_party/gsuite.rs:86— crates/app/ironclaw_cli/src/first_party/gsuite.rs:86-103 | crates/extensions/ironclaw_extension_host/src/test_support/first_party_registrars.rs:104-123 — before extracting anything, compare `crates/app/ironclaw_cli/src/first_party/gsuite.rs` and `crates/extensions/ironclaw_extension_host/src/test_support/first_party_registrars.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (17–20 lines × 2) crates/extensions/packages/slack/src/channel.rs:171— crates/extensions/packages/slack/src/channel.rs:171-190 | crates/extensions/packages/slack/src/channel.rs:223-239 — 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.
Duplicated block (19 lines × 3) crates/domains/ironclaw_triggers/src/libsql.rs:1123— crates/domains/ironclaw_triggers/src/libsql.rs:1123-1141 | crates/domains/ironclaw_triggers/src/libsql.rs:1238-1256 | crates/domains/ironclaw_triggers/src/libsql.rs:1317-1335 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (18 lines × 4) crates/product/ironclaw_openai_compat/src/responses_workflow.rs:227— crates/product/ironclaw_openai_compat/src/responses_workflow.rs:227-244 | crates/product/ironclaw_openai_compat/src/responses_workflow.rs:284-301 | crates/product/ironclaw_openai_compat/src/responses_workflow.rs:414-431 | crates/product/ironclaw_openai_compat/src/responses_workflow.rs:445-462 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (15–18 lines × 2) crates/product/ironclaw_assistant/src/run_delivery/triggered.rs:422— crates/product/ironclaw_assistant/src/run_delivery/triggered.rs:422-436 | crates/product/ironclaw_assistant/src/run_delivery/triggered.rs:517-534 — 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.
Duplicated block (17 lines × 5) crates/extensions/packages/google-docs/wasm-src/src/lib.rs:303— crates/extensions/packages/google-docs/wasm-src/src/lib.rs:303-319 | crates/extensions/packages/google-drive/wasm-src/src/lib.rs:247-263 | crates/extensions/packages/google-sheets/wasm-src/src/lib.rs:250-266 | crates/extensions/packages/google-slides/wasm-src/src/lib.rs:321-337 | crates/extensions/packages/slack/wasm-src/src/lib.rs:266-282 — before extracting anything, compare `crates/extensions/packages/google-docs/wasm-src/src/lib.rs` and `crates/extensions/packages/google-drive/wasm-src/src/lib.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13–17 lines × 2) crates/domains/ironclaw_trace_commons/src/contribution/remote/account.rs:415— crates/domains/ironclaw_trace_commons/src/contribution/remote/account.rs:415-427 | crates/domains/ironclaw_trace_commons/src/contribution/remote/account.rs:474-490 — 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.
Duplicated block (12–17 lines × 2) crates/extensions/packages/slack/src/payload.rs:330— crates/extensions/packages/slack/src/payload.rs:330-341 | crates/extensions/packages/slack/src/payload.rs:688-704 — 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.
Duplicated block (16–17 lines × 2) REDACTED:2934— REDACTED:2934-2950 | REDACTED:2506-2521 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 318 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9–17 lines × 2) crates/substrates/ironclaw_safety/src/provider_validation.rs:202— crates/substrates/ironclaw_safety/src/provider_validation.rs:202-218 | crates/substrates/ironclaw_safety/src/provider_validation.rs:224-232 — 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.
Duplicated block (11–16 lines × 4) crates/domains/ironclaw_llm/src/nearai_chat.rs:887— crates/domains/ironclaw_llm/src/nearai_chat.rs:887-901 | crates/domains/ironclaw_llm/src/nearai_chat.rs:970-980 | crates/domains/ironclaw_llm/src/nearai_chat.rs:1028-1043 | crates/domains/ironclaw_llm/src/nearai_chat.rs:1148-1159 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (16 lines × 4) crates/extensions/packages/google-docs/wasm-src/src/api.rs:128— crates/extensions/packages/google-docs/wasm-src/src/api.rs:128-143 | crates/extensions/packages/google-drive/wasm-src/src/api.rs:117-132 | crates/extensions/packages/google-sheets/wasm-src/src/api.rs:105-120 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:105-120 — before extracting anything, compare `crates/extensions/packages/google-docs/wasm-src/src/api.rs` and `crates/extensions/packages/google-drive/wasm-src/src/api.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10–16 lines × 2) crates/domains/ironclaw_llm/src/anthropic_oauth.rs:559— crates/domains/ironclaw_llm/src/anthropic_oauth.rs:559-574 | crates/domains/ironclaw_llm/src/anthropic_oauth.rs:630-639 — 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.
Duplicated block (13–16 lines × 2) tools/ironclaw_stress/src/scripted.rs:1251— tools/ironclaw_stress/src/scripted.rs:1251-1266 | tools/ironclaw_stress/src/scripted.rs:1287-1299 — 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.
Duplicated block (12–15 lines × 4) crates/extensions/packages/google-docs/wasm-src/src/api.rs:28— crates/extensions/packages/google-docs/wasm-src/src/api.rs:28-42 | crates/extensions/packages/google-drive/wasm-src/src/api.rs:37-48 | crates/extensions/packages/google-sheets/wasm-src/src/api.rs:28-39 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:28-39 — before extracting anything, compare `crates/extensions/packages/google-docs/wasm-src/src/api.rs` and `crates/extensions/packages/google-drive/wasm-src/src/api.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 4) crates/app/ironclaw_composition/src/deployment.rs:312— crates/app/ironclaw_composition/src/deployment.rs:312-325 | crates/app/ironclaw_composition/src/deployment.rs:350-363 | crates/app/ironclaw_composition/src/deployment.rs:409-422 | crates/app/ironclaw_composition/src/deployment.rs:498-511 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11–14 lines × 3) crates/domains/ironclaw_skills/src/selector.rs:421— crates/domains/ironclaw_skills/src/selector.rs:421-434 | crates/loop/ironclaw_loop_host/src/skill_activation/activation.rs:2139-2149 | crates/loop/ironclaw_loop_host/src/skill_activation/activation.rs:2173-2183 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (12–14 lines × 2) crates/contracts/ironclaw_host_api/src/capability_profile.rs:30— crates/contracts/ironclaw_host_api/src/capability_profile.rs:30-41 | crates/contracts/ironclaw_host_api/src/ingress.rs:69-82 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (13–14 lines × 2) crates/kernel/ironclaw_trust/src/sources.rs:199— crates/kernel/ironclaw_trust/src/sources.rs:199-212 | crates/kernel/ironclaw_trust/src/sources.rs:464-476 — 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.
Duplicated block (10–14 lines × 2) REDACTED:2917— REDACTED:2917-2930 | REDACTED:2493-2502 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 318 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 6) crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:168— crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:168-180 | crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:200-214 | crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:229-241 | crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:354-368 | crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:383-395 | crates/extensions/ironclaw_extension_support/src/gsuite/handlers.rs:482-494 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (13 lines × 4) crates/extensions/packages/memory-native/src/backend.rs:491— crates/extensions/packages/memory-native/src/backend.rs:491-503 | crates/extensions/packages/memory-native/src/backend.rs:605-617 | crates/extensions/packages/memory-native/src/backend.rs:703-715 | crates/extensions/packages/memory-native/src/backend.rs:813-825 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7–13 lines × 2) crates/domains/ironclaw_llm/src/rig_adapter.rs:601— crates/domains/ironclaw_llm/src/rig_adapter.rs:601-613 | crates/domains/ironclaw_llm/src/rig_adapter.rs:649-655 — 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.
Duplicated block (12 lines × 6) crates/extensions/ironclaw_extension_registry/src/installations.rs:1935— crates/extensions/ironclaw_extension_registry/src/installations.rs:1935-1946 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2244-2255 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2357-2368 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2448-2459 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2494-2505 | crates/extensions/ironclaw_extension_registry/src/installations.rs:3153-3164 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11–12 lines × 3) crates/lanes/ironclaw_mcp/src/client.rs:166— crates/lanes/ironclaw_mcp/src/client.rs:166-176 | crates/lanes/ironclaw_mcp/src/client.rs:444-455 | crates/lanes/ironclaw_mcp/src/client.rs:531-542 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8–11 lines × 4) crates/domains/ironclaw_llm/src/codex_chatgpt.rs:1003— crates/domains/ironclaw_llm/src/codex_chatgpt.rs:1003-1010 | crates/domains/ironclaw_llm/src/codex_chatgpt.rs:1023-1030 | crates/domains/ironclaw_llm/src/openai_codex_provider.rs:927-936 | crates/domains/ironclaw_llm/src/openai_codex_provider.rs:952-962 — before extracting anything, compare `crates/domains/ironclaw_llm/src/codex_chatgpt.rs` and `crates/domains/ironclaw_llm/src/openai_codex_provider.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9–11 lines × 3) tools/ironclaw_stress/src/main.rs:1317— tools/ironclaw_stress/src/main.rs:1317-1326 | tools/ironclaw_stress/src/main.rs:1357-1365 | tools/ironclaw_stress/src/sweep.rs:59-69 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (10–11 lines × 3) tools/ironclaw_stress/src/ramp.rs:314— tools/ironclaw_stress/src/ramp.rs:314-323 | tools/ironclaw_stress/src/suite.rs:489-499 | tools/ironclaw_stress/src/sweep.rs:499-509 — before extracting anything, compare `tools/ironclaw_stress/src/ramp.rs` and `tools/ironclaw_stress/src/suite.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8–11 lines × 2) crates/kernel/ironclaw_processes/src/journal_store/observer.rs:228— crates/kernel/ironclaw_processes/src/journal_store/observer.rs:228-238 | crates/kernel/ironclaw_processes/src/journal_store/observer.rs:316-323 — 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.
Duplicated block (4–11 lines × 3) tools/ironclaw_stress/src/user_turn.rs:796— tools/ironclaw_stress/src/user_turn.rs:796-806 | tools/ironclaw_stress/src/user_turn.rs:941-951 | tools/ironclaw_stress/src/user_turn.rs:1017-1020 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 8) crates/extensions/packages/github/wasm-src/src/api/actions.rs:121— crates/extensions/packages/github/wasm-src/src/api/actions.rs:121-129 | crates/extensions/packages/github/wasm-src/src/api/actions.rs:172-180 | crates/extensions/packages/github/wasm-src/src/api/issues.rs:432-440 | crates/extensions/packages/github/wasm-src/src/api/pulls.rs:209-217 | crates/extensions/packages/github/wasm-src/src/api/pulls.rs:280-288 | crates/extensions/packages/github/wasm-src/src/api/pulls.rs:370-378 | crates/extensions/packages/github/wasm-src/src/api/repos.rs:144-152 | crates/extensions/packages/github/wasm-src/src/api/repos.rs:209-217 — before extracting anything, compare `crates/extensions/packages/github/wasm-src/src/api/issues.rs` and `crates/extensions/packages/github/wasm-src/src/api/pulls.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 6) crates/extensions/ironclaw_extension_registry/src/installations.rs:1981— crates/extensions/ironclaw_extension_registry/src/installations.rs:1981-1989 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2046-2054 | crates/extensions/ironclaw_extension_registry/src/installations.rs:2122-2130 | crates/extensions/ironclaw_extension_registry/src/installations.rs:3196-3204 | crates/extensions/ironclaw_extension_registry/src/installations.rs:3441-3449 | crates/extensions/ironclaw_extension_registry/src/installations.rs:3610-3618 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7–9 lines × 2) crates/extensions/ironclaw_extension_support/src/skills/url_install/github.rs:329— crates/extensions/ironclaw_extension_support/src/skills/url_install/github.rs:329-337 | crates/extensions/ironclaw_extension_support/src/skills/url_install/github.rs:364-370 — 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.
Duplicated block (4–8 lines × 3) crates/kernel/ironclaw_host_runtime/src/first_party_tools/shell_core.rs:310— crates/kernel/ironclaw_host_runtime/src/first_party_tools/shell_core.rs:310-313 | crates/kernel/ironclaw_host_runtime/src/first_party_tools/shell_core.rs:414-421 | crates/kernel/ironclaw_host_runtime/src/first_party_tools/shell_core.rs:444-451 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6–7 lines × 4) crates/extensions/packages/google-docs/wasm-src/src/api.rs:107— crates/extensions/packages/google-docs/wasm-src/src/api.rs:107-113 | crates/extensions/packages/google-drive/wasm-src/src/api.rs:83-88 | crates/extensions/packages/google-sheets/wasm-src/src/api.rs:80-86 | crates/extensions/packages/google-slides/wasm-src/src/api.rs:80-86 — before extracting anything, compare `crates/extensions/packages/google-docs/wasm-src/src/api.rs` and `crates/extensions/packages/google-drive/wasm-src/src/api.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6–7 lines × 2) crates/domains/ironclaw_llm/src/gemini_oauth.rs:110— crates/domains/ironclaw_llm/src/gemini_oauth.rs:110-115 | crates/domains/ironclaw_llm/src/gemini_oauth.rs:124-130 — 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.
Duplicated block (2–5 lines × 7) crates/kernel/ironclaw_host_runtime/src/obligations/process_store.rs:451— crates/kernel/ironclaw_host_runtime/src/obligations/process_store.rs:451-455 | crates/kernel/ironclaw_host_runtime/src/obligations/process_store.rs:476-477 | crates/kernel/ironclaw_host_runtime/src/obligations/staged_handoffs.rs:298-299 | crates/kernel/ironclaw_host_runtime/src/obligations/staged_handoffs.rs:338-342 | crates/kernel/ironclaw_host_runtime/src/obligations/staged_handoffs.rs:436-440 | crates/kernel/ironclaw_host_runtime/src/post_edit_check.rs:201-202 | crates/lanes/ironclaw_mcp/src/client.rs:128-129 — there are 7 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (10 lines × 7) crates/contracts/ironclaw_extension_contracts/src/reply.rs:902— crates/contracts/ironclaw_extension_contracts/src/reply.rs:902-911 | crates/domains/ironclaw_threads/src/prepared_context.rs:413-422 | crates/kernel/ironclaw_host_runtime/src/memory_context.rs:313-322 | crates/loop/ironclaw_agent_loop/src/executor/capability_failure.rs:141-150 | crates/loop/ironclaw_agent_loop/src/executor/capability_helpers.rs:440-449 | crates/product/ironclaw_assistant/src/inspector_store.rs:1034-1043 | crates/product/ironclaw_assistant/src/projection/reply.rs:900-909 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 7 times.
Duplicated block (18 lines × 3) crates/contracts/ironclaw_host_api/src/outbound.rs:93— crates/contracts/ironclaw_host_api/src/outbound.rs:93-110 | crates/contracts/ironclaw_product_contracts/src/product_wire.rs:970-987 | crates/domains/ironclaw_outbound/src/delivery_targets.rs:484-501 — before extracting anything, compare `crates/contracts/ironclaw_product_contracts/src/product_wire.rs` and `crates/domains/ironclaw_outbound/src/delivery_targets.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 5) tools/ironclaw_stress/src/compare.rs:464— tools/ironclaw_stress/src/compare.rs:464-472 | tools/ironclaw_stress/src/human.rs:981-989 | tools/ironclaw_stress/src/ramp.rs:359-367 | tools/ironclaw_stress/src/suite.rs:610-618 | tools/ironclaw_stress/src/sweep.rs:568-576 — before extracting anything, compare `tools/ironclaw_stress/src/ramp.rs` and `tools/ironclaw_stress/src/suite.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 6) crates/domains/ironclaw_triggers/src/postgres.rs:570— crates/domains/ironclaw_triggers/src/postgres.rs:570-575 | crates/domains/ironclaw_triggers/src/postgres.rs:636-641 | crates/domains/ironclaw_triggers/src/postgres.rs:807-812 | crates/domains/ironclaw_triggers/src/postgres.rs:889-894 | crates/domains/ironclaw_triggers/src/postgres.rs:965-970 | crates/domains/ironclaw_triggers/src/postgres.rs:1044-1050 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (2–6 lines × 6) crates/kernel/ironclaw_turns/src/host_managed_ports/prompt.rs:34— crates/kernel/ironclaw_turns/src/host_managed_ports/prompt.rs:34-39 | crates/loop/ironclaw_agent_loop/src/executor/latency.rs:34-35 | crates/loop/ironclaw_agent_loop/src/executor/latency.rs:65-66 | crates/loop/ironclaw_loop_host/src/lib.rs:255-260 | crates/loop/ironclaw_turn_runner/src/loop_driver_host.rs:83-88 | crates/loop/ironclaw_turn_runner/src/loop_driver_host.rs:111-112 — there are 6 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5 lines × 8) crates/kernel/ironclaw_host_runtime/src/memory_context.rs:239— crates/kernel/ironclaw_host_runtime/src/memory_context.rs:239-243 | crates/kernel/ironclaw_host_runtime/src/obligations/process_store.rs:445-449 | crates/kernel/ironclaw_host_runtime/src/obligations/process_store.rs:471-475 | crates/kernel/ironclaw_host_runtime/src/obligations/staged_handoffs.rs:293-297 | crates/kernel/ironclaw_host_runtime/src/obligations/staged_handoffs.rs:332-336 | crates/kernel/ironclaw_host_runtime/src/obligations/staged_handoffs.rs:430-434 | crates/kernel/ironclaw_host_runtime/src/post_edit_check.rs:196-200 | crates/lanes/ironclaw_mcp/src/client.rs:123-127 — there are 8 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (57–75 lines × 2) scripts/reborn_webui_v2_live_qa/external_auth_helpers.py:209— scripts/reborn_webui_v2_live_qa/external_auth_helpers.py:209-283 | REDACTED:1131-1187 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/reborn_webui_v2_live_qa/external_auth_helpers.py:209` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (53–57 lines × 2) scripts/workflow_canary/scenarios/routine_visibility_from_telegram.py:123— scripts/workflow_canary/scenarios/routine_visibility_from_telegram.py:123-179 | scripts/workflow_canary/scenarios/telegram_round_trip.py:95-147 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/workflow_canary/scenarios/routine_visibility_from_telegram.py:123` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (48 lines × 2) scripts/reborn_webui_v2_live_qa/run_live_qa.py:3708— scripts/reborn_webui_v2_live_qa/run_live_qa.py:3708-3755 | scripts/reborn_webui_v2_live_qa/run_live_qa.py:3812-3859 — 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.
Duplicated block (46–47 lines × 2) scripts/reborn_webui_v2_live_qa/run_live_qa.py:5073— scripts/reborn_webui_v2_live_qa/run_live_qa.py:5073-5118 | scripts/reborn_webui_v2_live_qa/run_live_qa.py:6063-6109 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/reborn_webui_v2_live_qa/run_live_qa.py:5073` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (41–42 lines × 2) scripts/workflow_canary/scenarios/calendar_prep.py:172— scripts/workflow_canary/scenarios/calendar_prep.py:172-213 | scripts/workflow_canary/scenarios/crm_tracker.py:214-254 — before extracting anything, compare `scripts/workflow_canary/scenarios/calendar_prep.py` and `scripts/workflow_canary/scenarios/crm_tracker.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/workflow_canary/scenarios/calendar_prep.py:172` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (36–40 lines × 5) scripts/workflow_canary/scenarios/bug_logger.py:153— scripts/workflow_canary/scenarios/bug_logger.py:153-188 | scripts/workflow_canary/scenarios/calendar_prep.py:175-214 | scripts/workflow_canary/scenarios/crm_tracker.py:217-255 | scripts/workflow_canary/scenarios/first_immediate_run.py:70-108 | scripts/workflow_canary/scenarios/hn_monitor.py:151-188 — before extracting anything, compare `scripts/workflow_canary/scenarios/bug_logger.py` and `scripts/workflow_canary/scenarios/calendar_prep.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `scripts/workflow_canary/scenarios/bug_logger.py:189` calls `perf_counter` and `scripts/workflow_canary/scenarios/first_immediate_run.py:109` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (34–35 lines × 2) REDACTED:827— REDACTED:827-860 | REDACTED:868-902 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (30–31 lines × 3) scripts/reborn_webui_v2_live_qa/external_auth_helpers.py:193— scripts/reborn_webui_v2_live_qa/external_auth_helpers.py:193-222 | scripts/reborn_webui_v2_live_qa/google_auth_helpers.py:694-724 | REDACTED:1115-1144 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (27–30 lines × 4) scripts/reborn_webui_v2_live_qa/run_live_qa.py:9375— scripts/reborn_webui_v2_live_qa/run_live_qa.py:9375-9404 | scripts/reborn_webui_v2_live_qa/run_live_qa.py:9407-9433 | scripts/reborn_webui_v2_live_qa/run_live_qa.py:9547-9575 | scripts/reborn_webui_v2_live_qa/run_live_qa.py:9578-9605 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/reborn_webui_v2_live_qa/run_live_qa.py:9375` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (21–27 lines × 3) scripts/reborn_webui_v2_live_qa/run_live_qa.py:2844— scripts/reborn_webui_v2_live_qa/run_live_qa.py:2844-2870 | scripts/reborn_webui_v2_live_qa/run_live_qa.py:3693-3714 | scripts/reborn_webui_v2_live_qa/run_live_qa.py:3798-3818 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/reborn_webui_v2_live_qa/run_live_qa.py:2844` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (25 lines × 4) scripts/reborn_webui_v2_live_qa/run_live_qa.py:9378— scripts/reborn_webui_v2_live_qa/run_live_qa.py:9378-9405 | scripts/reborn_webui_v2_live_qa/run_live_qa.py:9410-9434 | scripts/reborn_webui_v2_live_qa/run_live_qa.py:9519-9545 | scripts/reborn_webui_v2_live_qa/run_live_qa.py:9550-9576 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/reborn_webui_v2_live_qa/run_live_qa.py:9378` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9–24 lines × 2) scripts/live-canary/notify_slack.py:224— scripts/live-canary/notify_slack.py:224-247 | scripts/live-canary/notify_slack.py:419-427 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18–19 lines × 3) scripts/workflow_canary/scenarios/bug_logger.py:121— scripts/workflow_canary/scenarios/bug_logger.py:121-139 | scripts/workflow_canary/scenarios/calendar_prep.py:110-127 | scripts/workflow_canary/scenarios/hn_monitor.py:103-120 — before extracting anything, compare `scripts/workflow_canary/scenarios/bug_logger.py` and `scripts/workflow_canary/scenarios/calendar_prep.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14–16 lines × 2) scripts/reborn_webui_v2_live_qa/run_live_qa.py:4191— scripts/reborn_webui_v2_live_qa/run_live_qa.py:4191-4204 | scripts/reborn_webui_v2_live_qa/run_live_qa.py:4402-4417 — 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.
Duplicated block (10–15 lines × 2) scripts/live_canary/common.py:476— scripts/live_canary/common.py:476-490 | scripts/live_canary/common.py:590-599 — 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.
Duplicated block (11–12 lines × 4) scripts/reborn_webui_v2_live_qa/google_api_helpers.py:91— scripts/reborn_webui_v2_live_qa/google_api_helpers.py:91-102 | scripts/reborn_webui_v2_live_qa/google_api_helpers.py:210-220 | scripts/reborn_webui_v2_live_qa/google_api_helpers.py:314-324 | scripts/reborn_webui_v2_live_qa/google_api_helpers.py:344-354 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/reborn_webui_v2_live_qa/google_api_helpers.py:91` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–12 lines × 2) scripts/live-canary/notify_slack.py:640— scripts/live-canary/notify_slack.py:640-651 | scripts/live-canary/notify_slack.py:657-666 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7–12 lines × 2) scripts/live-canary/notify_slack.py:697— scripts/live-canary/notify_slack.py:697-708 | scripts/live-canary/notify_slack.py:1418-1424 — 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.
Duplicated block (12–13 lines × 4) crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:458— crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:458-470 | crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:528-539 | crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:596-607 | crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:834-845 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9–10 lines × 3) crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:400— crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:400-409 | crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:505-513 | crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:573-581 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7–8 lines × 4) crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:450— crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:450-457 | crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:521-527 | crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:589-595 | crates/app/ironclaw_composition/src/test_support/oauth_product_auth.rs:827-833 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — crates/product/ironclaw_webui/frontend/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. 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.
No DR/backup evidence — A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.
Duplication concentrated across 10 sibling directories (31 clone groups) crates/product/ironclaw_webui/frontend/src/pages/admin/components/users-tab.tsx:88— 31 duplicated blocks under crates/product/ironclaw_webui/frontend/src/pages/ have copies in at least two of the sibling directories admin, automations, chat, extensions, jobs, logs (+4 more sibling(s) not listed) — 16 of them are reported below, and 15 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 31 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 31 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 31 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.
Duplication concentrated across 6 sibling directories (20 clone groups) crates/product/ironclaw_webui/frontend/src/design-system/select-menu.tsx:348— 20 duplicated blocks under crates/product/ironclaw_webui/frontend/src/ have copies in at least two of the sibling directories app, components, design-system, hooks, lib, pages — 10 of them are reported below, and 10 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 20 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 20 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 20 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.
R10 · Code Duplication· Duplicated block with local edits (93 matched lines × 2 locations) · ×1
Duplicated block with local edits (93 matched lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/admin/components/users-tab.tsx:88— crates/product/ironclaw_webui/frontend/src/pages/admin/components/users-tab.tsx:88 · crates/product/ironclaw_webui/frontend/src/pages/settings/components/users-tab.tsx:32 — the two spans are one implementation copied and then locally edited — 490 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.
Duplicated block (50 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/extensions/components/channels-tab.tsx:34— crates/product/ironclaw_webui/frontend/src/pages/extensions/components/channels-tab.tsx:34 · crates/product/ironclaw_webui/frontend/src/pages/extensions/components/tools-tab.tsx:45 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication· Duplicated block with local edits (27 matched lines × 2 locations) · ×1
Duplicated block with local edits (27 matched lines × 2 locations) crates/product/ironclaw_webui/frontend/src/lib/pin-store.ts:45— crates/product/ironclaw_webui/frontend/src/lib/pin-store.ts:45 · crates/product/ironclaw_webui/frontend/src/lib/thread-state.ts:94 — the two spans are one implementation copied and then locally edited — 102 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.
R10 · Code Duplication· Duplicated block with local edits (25 matched lines × 2 locations) · ×1
Duplicated block with local edits (25 matched lines × 2 locations) crates/product/ironclaw_webui/frontend/src/design-system/select-menu.tsx:348— crates/product/ironclaw_webui/frontend/src/design-system/select-menu.tsx:348 · crates/product/ironclaw_webui/frontend/src/pages/workspace/components/workspace-tree.tsx:380 — the two spans are one implementation copied and then locally edited — 103 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.
Duplicated block (24 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/settings/components/agent-tab.tsx:18— crates/product/ironclaw_webui/frontend/src/pages/settings/components/agent-tab.tsx:18 · crates/product/ironclaw_webui/frontend/src/pages/settings/components/networking-tab.tsx:37 — 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.
Duplicated block (20 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/lib/api.ts:696— crates/product/ironclaw_webui/frontend/src/lib/api.ts:696 · crates/product/ironclaw_webui/frontend/src/lib/api.ts:727 — 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.
Duplicated block (18 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/workspace/components/workspace-tree.tsx:158— crates/product/ironclaw_webui/frontend/src/pages/workspace/components/workspace-tree.tsx:158 · crates/product/ironclaw_webui/frontend/src/pages/workspace/components/workspace-tree.tsx:492 — all 2 copies are in the same file, 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.
R10 · Code Duplication· Duplicated block with local edits (16 matched lines × 2 locations) · ×1
Duplicated block with local edits (16 matched lines × 2 locations) crates/product/ironclaw_webui/frontend/src/lib/device-push.ts:200— crates/product/ironclaw_webui/frontend/src/lib/device-push.ts:200 · crates/product/ironclaw_webui/frontend/src/lib/device-push.ts:263 — the two spans are one implementation copied and then locally edited — 100 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.
Duplicated block (16 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx:225— crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx:225 · crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx:243 — 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.
Duplicated block (14 lines × 3 locations) crates/product/ironclaw_webui/frontend/src/pages/extensions/components/channels-tab.tsx:53— crates/product/ironclaw_webui/frontend/src/pages/extensions/components/channels-tab.tsx:53 · crates/product/ironclaw_webui/frontend/src/pages/extensions/components/tools-tab.tsx:64 · crates/product/ironclaw_webui/frontend/src/pages/settings/components/trace-commons-tab.tsx:228 — the 3 copies are spread across 3 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.
Duplicated block (11 lines × 2 locations) crates/product/ironclaw_webui/frontend/src/lib/thread-meta.ts:46— crates/product/ironclaw_webui/frontend/src/lib/thread-meta.ts:46 · crates/product/ironclaw_webui/frontend/src/pages/workspace/lib/workspace-presenters.ts: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.
Complex function MessageBubbleImpl (cyclomatic 82, cognitive 69) crates/product/ironclaw_webui/frontend/src/pages/chat/components/message-bubble.tsx:124— MessageBubbleImpl has cyclomatic complexity 82 and cognitive complexity 69; 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.
Complex function applyProjectionItems (cyclomatic 74, cognitive 141) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:523— applyProjectionItems has cyclomatic complexity 74 and cognitive complexity 141; 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.
Complex function ProviderCard (cyclomatic 51, cognitive 43) crates/product/ironclaw_webui/frontend/src/pages/settings/components/provider-card.tsx:17— ProviderCard has cyclomatic complexity 51 and cognitive complexity 43; 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.
Complex function (anonymous) (cyclomatic 49, cognitive 63) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChat.ts:539— (anonymous) has cyclomatic complexity 49 and cognitive complexity 63; 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.
Complex function Chat (cyclomatic 49, cognitive 40) crates/product/ironclaw_webui/frontend/src/pages/chat/chat.tsx:106— Chat has cyclomatic complexity 49 and cognitive complexity 40; 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.
Complex function (anonymous) (cyclomatic 48, cognitive 40) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/useChatEvents.ts:88— (anonymous) has cyclomatic complexity 48 and cognitive complexity 40; 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.
Complex function ConfigureModal (cyclomatic 45, cognitive 38) crates/product/ironclaw_webui/frontend/src/pages/extensions/components/configure-modal.tsx:44— ConfigureModal has cyclomatic complexity 45 and cognitive complexity 38; 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.
Complex function ExtensionCard (cyclomatic 38, cognitive 34) crates/product/ironclaw_webui/frontend/src/pages/extensions/components/extension-card.tsx:148— ExtensionCard has cyclomatic complexity 38 and cognitive complexity 34; 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.
Complex function scheduleLabel (cyclomatic 37, cognitive 33) crates/product/ironclaw_webui/frontend/src/pages/automations/lib/automations-presenters.ts:129— scheduleLabel has cyclomatic complexity 37 and cognitive complexity 33; 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.
Complex function ChatInput (cyclomatic 35, cognitive 31) crates/product/ironclaw_webui/frontend/src/pages/chat/components/chat-input.tsx:30— ChatInput has cyclomatic complexity 35 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 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.
Complex function mergeToolActivity (cyclomatic 34, cognitive 26) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/tool-activity-state.ts:136— mergeToolActivity has cyclomatic complexity 34 and cognitive complexity 26; 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.
Complex function LogsPage (cyclomatic 31, cognitive 27) crates/product/ironclaw_webui/frontend/src/pages/logs/logs-page.tsx:121— LogsPage has cyclomatic complexity 31 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 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.
Complex function publishProductInspectorEnvelope (cyclomatic 27, cognitive 31) crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/product-activity-envelope.ts:123— publishProductInspectorEnvelope has cyclomatic complexity 27 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.
Complex function (anonymous) (cyclomatic 26, cognitive 26) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useChannelOnboarding.ts:511— (anonymous) has cyclomatic complexity 26 and cognitive complexity 26; 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.
Complex function toolCardFromPreview (cyclomatic 26, cognitive 18) crates/product/ironclaw_webui/frontend/src/pages/chat/lib/history-messages.ts:201— toolCardFromPreview has cyclomatic complexity 26 and cognitive complexity 18; 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.
Complex function Button (cyclomatic 25, cognitive 26) crates/product/ironclaw_webui/frontend/src/design-system/button.tsx:110— Button has cyclomatic complexity 25 and cognitive complexity 26; 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.
Complex function isDeviceLinkPromptWire (cyclomatic 25, cognitive 22) crates/product/ironclaw_webui/frontend/src/lib/device-link-api.ts:81— isDeviceLinkPromptWire has cyclomatic complexity 25 and cognitive complexity 22; 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.
Complex function SkillCard (cyclomatic 25, cognitive 20) crates/product/ironclaw_webui/frontend/src/pages/settings/components/skill-card.tsx:8— SkillCard has cyclomatic complexity 25 and cognitive complexity 20; 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.
Complex function UserDetailView (cyclomatic 24, cognitive 20) crates/product/ironclaw_webui/frontend/src/pages/admin/components/user-detail.tsx:47— UserDetailView has cyclomatic complexity 24 and cognitive complexity 20; 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.
Complex function insertPreservedAtOriginalPositions (cyclomatic 23, cognitive 32) crates/product/ironclaw_webui/frontend/src/pages/chat/hooks/useHistory.ts:736— insertPreservedAtOriginalPositions has cyclomatic complexity 23 and cognitive complexity 32; 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.
Large Files — 32 file(s) over 400 lines (counted as significant lines — blank lines excluded — over production source only, tests excluded), largest first: crates/product/ironclaw_webui/frontend/src/i18n/es.ts (1642), crates/product/ironclaw_webui/frontend/src/i18n/ar.ts (1641), crates/product/ironclaw_webui/frontend/src/i18n/de.ts (1641), crates/product/ironclaw_webui/frontend/src/i18n/fr.ts (1641), crates/product/ironclaw_webui/frontend/src/i18n/hi.ts (1641), crates/product/ironclaw_webui/frontend/src/i18n/ja.ts (1641) (+26 more).
R6 · Tooling· The declared test suite includes a file that cannot be loaded · ×1
The declared test suite includes a file that cannot be loaded crates/product/ironclaw_webui/frontend/src/app/retired-routines.test.ts— This repository declares test tooling, and the ✓ above records that declaration — but crates/product/ironclaw_webui/frontend/src/app/retired-routines.test.ts and 1 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to.
Dead file (~268 LoC) crates/product/ironclaw_webui/frontend/src/pages/settings/components/channels-tab.tsx— no import path from any entry point (15 application, 6 tooling, 318 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
Dead file (~227 LoC) crates/product/ironclaw_webui/frontend/src/pages/settings/components/users-tab.tsx— no import path from any entry point (15 application, 6 tooling, 318 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
Dead file (~150 LoC) crates/product/ironclaw_webui/frontend/src/design-system/props.type-test.tsx— no import path from any entry point (15 application, 6 tooling, 318 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
Dead file (~142 LoC) crates/product/ironclaw_webui/frontend/src/pages/chat/components/thread-sidebar.tsx— no import path from any entry point (15 application, 6 tooling, 318 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
Dead file (~97 LoC) crates/product/ironclaw_webui/frontend/src/pages/projects/components/project-inspector-rail.tsx— no import path from any entry point (15 application, 6 tooling, 318 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
Dead file (~81 LoC) crates/product/ironclaw_webui/frontend/src/pages/projects/components/project-thread-inspector.tsx— no import path from any entry point (15 application, 6 tooling, 318 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (crates/product/ironclaw_webui/frontend/src/pages/projects/components/project-inspector-rail.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~76 LoC) crates/product/ironclaw_webui/frontend/src/pages/projects/components/project-widgets.tsx— no import path from any entry point (15 application, 6 tooling, 318 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
Dead file (~73 LoC) crates/product/ironclaw_webui/frontend/src/pages/settings/components/agent-tab.tsx— no import path from any entry point (15 application, 6 tooling, 318 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
Dead file (~63 LoC) crates/product/ironclaw_webui/frontend/src/pages/settings/components/networking-tab.tsx— no import path from any entry point (15 application, 6 tooling, 318 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
Dead file (~51 LoC) crates/product/ironclaw_webui/frontend/src/pages/projects/components/projects-attention-strip.tsx— no import path from any entry point (15 application, 6 tooling, 318 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
Dead file (~40 LoC) crates/product/ironclaw_webui/frontend/src/pages/settings/hooks/useUsers.ts— no import path from any entry point (15 application, 6 tooling, 318 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (crates/product/ironclaw_webui/frontend/src/pages/settings/components/users-tab.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~27 LoC) crates/product/ironclaw_webui/frontend/src/pages/chat/components/code-block.tsx— no import path from any entry point (15 application, 6 tooling, 318 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
Dead file (~19 LoC) crates/product/ironclaw_webui/frontend/src/pages/projects/hooks/useProjectInspector.ts— no import path from any entry point (15 application, 6 tooling, 318 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
Subsumed condition operand crates/substrates/ironclaw_safety/src/display_redaction.rs:384— `lower.contains("access_token=")` can never decide this `||` — every value satisfying `lower.contains("access_token=")` also satisfies `lower.contains("token=")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand crates/substrates/ironclaw_safety/src/display_redaction.rs:385— `lower.contains("access_token:")` can never decide this `||` — every value satisfying `lower.contains("access_token:")` also satisfies `lower.contains("token:")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand crates/loop/ironclaw_loop_host/src/model_gateway.rs:3040— `lower.contains("402 payment required")` can never decide this `||` — every value satisfying `lower.contains("402 payment required")` also satisfies `lower.contains("payment required")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand crates/loop/ironclaw_loop_host/src/model_gateway.rs:3043— `lower.contains("insufficient credits")` can never decide this `||` — every value satisfying `lower.contains("insufficient credits")` also satisfies `lower.contains("insufficient credit")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand crates/loop/ironclaw_loop_host/src/model_gateway.rs:3045— `lower.contains("not enough credits")` can never decide this `||` — every value satisfying `lower.contains("not enough credits")` also satisfies `lower.contains("not enough credit")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand crates/app/ironclaw_cli/tests/smoke.rs:6619— `stderr.contains("inline secret")` can never decide this `||` — every value satisfying `stderr.contains("inline secret")` also satisfies `stderr.contains("secret")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand crates/app/ironclaw_cli/tests/smoke.rs:6951— `stderr.contains("inline secret")` can never decide this `||` — every value satisfying `stderr.contains("inline secret")` also satisfies `stderr.contains("secret")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand crates/app/ironclaw_architecture_tests/tests/telegram_extension_gates.rs:434— `trimmed.starts_with("///")` can never decide this `||` — every value satisfying `trimmed.starts_with("///")` also satisfies `trimmed.starts_with("//")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand crates/loop/ironclaw_hooks/src/dispatch/mod.rs:5367— `msg.contains("after_turn")` can never decide this `&&` — every value satisfying `msg.contains("install_builtin_after_turn")` also satisfies `msg.contains("after_turn")`, so the `&&` chain is already decided by the former. The expression is equivalent to the chain without it, which means it is narrower than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand crates/domains/ironclaw_trace_commons/src/contribution/remote/claim.rs:307— `message.contains("internet connection appears to be offline")` can never decide this `||` — every value satisfying `message.contains("internet connection appears to be offline")` also satisfies `message.contains("offline")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand crates/domains/ironclaw_trace_commons/src/contribution/remote/claim.rs:317— `message.contains("connection refused")` can never decide this `||` — every value satisfying `message.contains("connection refused")` also satisfies `message.contains("refused")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 35 significant file(s) lose their only recent owner: tools/ironclaw_stress/src/scripted.rs, tools/ironclaw_stress/src/api_capacity.rs, crates/lanes/ironclaw_sandbox/src/sandbox_process/railway.rs, crates/kernel/ironclaw_host_runtime/src/first_party_tools/json.rs, crates/lanes/ironclaw_sandbox/src/sandbox_process/user_container.rs, tools/ironclaw_stress/src/analysis.rs, crates/domains/ironclaw_skills/src/management/install_bundle.rs, tools/ironclaw_stress/src/suite.rs (+27 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 27 significant file(s) lose their only recent owner: crates/product/ironclaw_assistant/src/model_channel_delivery/tests.rs, crates/extensions/ironclaw_extension_host/src/egress.rs, crates/extensions/ironclaw_extension_host/src/channel_command_roles.rs, crates/product/ironclaw_assistant/src/model_channel_delivery.rs, crates/extensions/packages/slack/wasm-src/src/types.rs, crates/extensions/ironclaw_extension_manager/src/channel_config_product_service.rs, crates/extensions/packages/telegram/src/payload.rs, crates/extensions/packages/telegram/src/channel.rs (+19 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 23 significant file(s) lose their only recent owner: crates/contracts/ironclaw_product_contracts/src/inspector.rs, crates/domains/ironclaw_notifications/src/store.rs, crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/inspector-panel.tsx, crates/product/ironclaw_webui/frontend/src/design-system/select-menu.tsx, crates/product/ironclaw_webui/frontend/src/pages/chat/inspector/useInspector.ts, crates/product/ironclaw_webui/frontend/src/pages/settings/components/model-selection-policy-editor.tsx, crates/domains/ironclaw_notifications/src/types.rs, crates/product/ironclaw_webui/src/webui_v2/inspector.rs (+15 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 8 significant file(s) lose their only recent owner: crates/loop/ironclaw_turn_runner/src/structured_finalization/tests.rs, crates/loop/ironclaw_loop_host/src/system_inference/tests.rs, crates/loop/ironclaw_turn_runner/src/subagent/await_edge/store/tests.rs, crates/loop/ironclaw_turn_runner/src/structured_finalization.rs, crates/kernel/ironclaw_host_runtime/src/capability_response_processor.rs, scripts/ci/lib/integration_test_inventory.py, crates/extensions/packages/github/wasm-src/src/api/contents.rs, crates/domains/ironclaw_triggers/src/trusted_submit.rs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 5 significant file(s) lose their only recent owner: crates/loop/ironclaw_hooks/src/evaluator.rs, crates/loop/ironclaw_hooks/src/postgres_backend/backend.rs, crates/loop/ironclaw_hooks/src/manifest.rs, crates/loop/ironclaw_hooks/src/identity.rs, crates/loop/ironclaw_hooks/src/installed_hook.rs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #6 — If anonymized user #6 becomes unavailable, 5 significant file(s) lose their only recent owner: crates/contracts/ironclaw_common/src/attachment_format.rs, crates/contracts/ironclaw_common/src/identity.rs, crates/product/ironclaw_openai_compat/src/content_parts.rs, crates/contracts/ironclaw_host_api/src/safe_summary.rs, crates/contracts/ironclaw_common/src/attachment.rs. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 2 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (105 single-owned of 1689 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 1689 of the 2026 production source files in this repository met that bar). They are anonymized user #7 (1 file(s)), anonymized user #8 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 16 of 78 project(s) overshoot their size bounds, lowering Project Cohesion to 5.9/10. The most over is `crates/product/ironclaw_assistant` (69392 LoC, 333 public types across 12 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 29 of 1689 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 1689 of the 2026 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: scripts/workflow_canary/telegram_mock.py, scripts/workflow_canary/sheets_mock.py, scripts/workflow_canary/telegram_setup.py, scripts/workflow_canary/routines.py, scripts/workflow_canary/calendar_mock.py, scripts/workflow_canary/scenarios/crm_tracker.py, scripts/workflow_canary/scenarios/calendar_prep.py, scripts/workflow_canary/scenarios/manual_trigger_from_telegram.py (and 21 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
Logging is not universal — Only 54/56 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/product/ironclaw_host_ingress`, `harness/latency/runner`.
R7 · Dead Code· Unused export 'routeSectionDefs' · ×1
Unused export 'routeSectionDefs' crates/product/ironclaw_webui/frontend/src/app/routes.ts:31— Nothing imports this binding — it is safe to review for removal.
Unused export 'routeForId' crates/product/ironclaw_webui/frontend/src/app/routes.ts:81— Nothing imports this binding — it is safe to review for removal.
Unused export 'StatusPill' crates/product/ironclaw_webui/frontend/src/design-system/badge.tsx:96— Nothing imports THIS copy of 'StatusPill' — but crates/product/ironclaw_webui/frontend/src/design-system/primitives.tsx:19 in the same directory exports that same name, and it is the copy every import site resolves to. Grepping the name therefore finds live callers that do not reach this binding: it is the dead half of a duplicated pair, left behind when the API moved. Delete it here and keep crates/product/ironclaw_webui/frontend/src/design-system/primitives.tsx's, or, if this one is meant to be the survivor, repoint the importers before removing the other.
Unused export 'cx' crates/product/ironclaw_webui/frontend/src/design-system/primitives.tsx:33— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'optionalString' · ×1
Unused export 'optionalString' crates/product/ironclaw_webui/frontend/src/lib/channel-setup-api.ts:26— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'readDeviceLinkFlow' · ×1
Unused export 'readDeviceLinkFlow' crates/product/ironclaw_webui/frontend/src/lib/device-link-api.ts:291— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'summarizeUsers' · ×1
Unused export 'summarizeUsers' crates/product/ironclaw_webui/frontend/src/pages/admin/lib/admin-presenters.ts:115— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'parseCustomProviders' · ×1
Unused export 'parseCustomProviders' crates/product/ironclaw_webui/frontend/src/pages/settings/lib/llm-providers.ts:14— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'parseBuiltinOverrides' · ×1
Unused export 'parseBuiltinOverrides' crates/product/ironclaw_webui/frontend/src/pages/settings/lib/llm-providers.ts:25— Nothing imports this binding — it is safe to review for removal.
Unused export 'fetchSetting' crates/product/ironclaw_webui/frontend/src/pages/settings/lib/settings-api.ts:142— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'formatWorkspaceDate' · ×1
Unused export 'formatWorkspaceDate' crates/product/ironclaw_webui/frontend/src/pages/workspace/lib/workspace-presenters.ts:112— Nothing imports this binding — it is safe to review for removal.
Unused export 'snippetFor' crates/product/ironclaw_webui/frontend/src/pages/workspace/lib/workspace-presenters.ts:122— Nothing imports this binding — it is safe to review for removal.
Outdated: aes-gcm — `aes-gcm` is locked at 0.11.0 but 0.11.1 is the current stable release on crates.io, and it already satisfies the `"0.11"` requirement declared in crates/substrates/ironclaw_secrets/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aes-gcm` and commit the updated REDACTED.
Outdated: aws-config — `aws-config` is locked at 1.8.18 but 1.12.0 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/domains/ironclaw_llm/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-config` and commit the updated REDACTED.
Outdated: aws-lc-rs — `aws-lc-rs` is locked at 1.18.0 but 1.18.1 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/domains/ironclaw_web_app/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-lc-rs` and commit the updated REDACTED.
Outdated: aws-sdk-bedrockruntime — `aws-sdk-bedrockruntime` is locked at 1.135.0 but 1.147.0 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/domains/ironclaw_llm/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-sdk-bedrockruntime` and commit the updated REDACTED.
Outdated: aws-smithy-types — `aws-smithy-types` is locked at 1.5.0 but 1.8.1 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/domains/ironclaw_llm/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-smithy-types` and commit the updated REDACTED.
Outdated: blake3 — `blake3` is locked at 1.8.6 but 1.8.7 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/contracts/ironclaw_loop_contracts/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p blake3` and commit the updated REDACTED.
Outdated: clap — `clap` is locked at 4.6.6 but 4.6.7 is the current stable release on crates.io, and it already satisfies the `"4"` requirement declared in tools/ironclaw_stress/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p clap` and commit the updated REDACTED.
Outdated: clap_complete — `clap_complete` is locked at 4.6.9 but 4.6.11 is the current stable release on crates.io, and it already satisfies the `"4.5.0"` requirement declared in crates/app/ironclaw_cli/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p clap_complete` and commit the updated REDACTED.
Outdated: deadpool — `deadpool` is locked at 0.13.0 but 0.13.1 is the current stable release on crates.io, and it already satisfies the `"0.13"` requirement declared in crates/substrates/ironclaw_filesystem/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p deadpool` and commit the updated REDACTED.
Outdated: deadpool-postgres — `deadpool-postgres` is locked at 0.14.1 but 0.14.2 is the current stable release on crates.io, and it already satisfies the `"0.14"` requirement declared in tools/ironclaw_stress/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p deadpool-postgres` and commit the updated REDACTED.
Outdated: encoding_rs — `encoding_rs` is locked at 0.8.35 but 0.8.42 is the current stable release on crates.io, and it already satisfies the `"0.8"` requirement declared in crates/extensions/ironclaw_extension_support/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p encoding_rs` and commit the updated REDACTED.
Outdated: jsonwebtoken — `jsonwebtoken` is locked at 11.0.0 but 11.1.0 is the current stable release on crates.io, and it already satisfies the `"11"` requirement declared in crates/domains/ironclaw_trace_commons/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p jsonwebtoken` and commit the updated REDACTED.
Outdated: lru — `lru` is locked at 0.18.2 but 0.18.5 is the current stable release on crates.io, and it already satisfies the `"0.18"` requirement declared in crates/app/ironclaw_composition/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p lru` and commit the updated REDACTED.
Outdated: open — `open` is locked at 5.4.1 but 5.4.4 is the current stable release on crates.io, and it already satisfies the `"5"` requirement declared in crates/domains/ironclaw_llm/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p open` and commit the updated REDACTED.
Outdated: pdf-extract — `pdf-extract` is locked at 0.12.0 but 0.12.1 is the current stable release on crates.io, and it already satisfies the `"0.12"` requirement declared in crates/domains/ironclaw_extractors/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p pdf-extract` and commit the updated REDACTED.
Outdated: printpdf — `printpdf` is locked at 0.12.5 but 0.12.8 is the current stable release on crates.io, and it already satisfies the `"0.12"` requirement declared in crates/substrates/ironclaw_documents/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p printpdf` and commit the updated REDACTED.
Outdated: rand — `rand` is locked at 0.10.2 but 0.10.3 is the current stable release on crates.io, and it already satisfies the `"0.10"` requirement declared in crates/app/ironclaw_cli/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rand` and commit the updated REDACTED.
Outdated: rcgen — `rcgen` is locked at 0.14.9 but 0.14.10 is the current stable release on crates.io, and it already satisfies the `"0.14"` requirement declared in crates/lanes/ironclaw_sandbox/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rcgen` and commit the updated REDACTED.
Outdated: rust_decimal — `rust_decimal` is locked at 1.42.1 but 1.43.0 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in tools/ironclaw_stress/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rust_decimal` and commit the updated REDACTED.
Outdated: rustls — `rustls` is locked at 0.23.43 but 0.23.45 is the current stable release on crates.io, and it already satisfies the `"0.23"` requirement declared in crates/events/ironclaw_event_store/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rustls` and commit the updated REDACTED.
Outdated: secret-service — `secret-service` is locked at 5.1.0 but 5.2.0 is the current stable release on crates.io, and it already satisfies the `"5"` requirement declared in crates/substrates/ironclaw_secrets/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p secret-service` and commit the updated REDACTED.
Outdated: similar — `similar` is locked at 3.1.2 but 3.2.0 is the current stable release on crates.io, and it already satisfies the `"3"` requirement declared in crates/extensions/ironclaw_extension_support/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p similar` and commit the updated REDACTED.
Outdated: thiserror — `thiserror` is locked at 2.0.20 but 2.0.21 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in tools/ironclaw_stress/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p thiserror` and commit the updated REDACTED.
Outdated: toml — `toml` is locked at 1.1.4+spec-1.1.0 but 1.1.6+spec-1.1.0 is the current stable release on crates.io, and it already satisfies the `"1.1"` requirement declared in crates/app/ironclaw_composition/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p toml` and commit the updated REDACTED.
Outdated: toml_edit — `toml_edit` is locked at 0.25.13+spec-1.1.0 but 0.25.15+spec-1.1.0 is the current stable release on crates.io, and it already satisfies the `"0.25"` requirement declared in crates/app/ironclaw_config/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p toml_edit` and commit the updated REDACTED.
+ 2 more in this group — see findings.md.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
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. semgrep could not parse 32 file(s) — `crates/product/ironclaw_webui/frontend/src/components/command-palette.stories.tsx`, `crates/product/ironclaw_webui/frontend/src/components/notification-center.stories.tsx`, `crates/product/ironclaw_webui/frontend/src/components/page-header.stories.tsx`, `crates/product/ironclaw_webui/frontend/src/components/pairing-web-code-panel.stories.tsx`, `crates/product/ironclaw_webui/frontend/src/components/sidebar-footer.stories.tsx`, … (+27 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
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.
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.
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.
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.
Run 01a0eac0-28e4-7ea8-83ea-2c820e9ad1bd · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 68 · Warnings: 2770 · Recommendations: 41 · Info: 27 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 29-09-2026 @ 01:20 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.