Urgent.News

What's breaking now, across thousands of outlets.

Tech

6,718 of my 10,238 code blocks had no owner. Every single one was in the same directory.

The rule is that every block of code stands under a declared owner, so that for any function you can ask which stated responsibility it serves and get one answer. The rule had existed for a while. Nothing had ever counted it. The first census: kind total under an owner orphan code blocks 10,238 3,520 6,718 Rust functions 2,004 1,088 916 proof declarations 600 213 387 cross-layer edges 50 35 15…

Every one of the 10,238 Rust code blocks in the instrument directory lacked an assigned owner, amounting to 6,718 unclaimed blocks. This staggering statistic marked the culmination of a code ownership audit. The census revealed that all of these orphan blocks were concentrated within a single directory: tools/. The issue stemmed from the fact that the code ownership model had been created with the product in mind, while the tooling had grown alongside the product.

Consequently, the tools existed outside the ownership model, and the census revealed that the situation was resolved when a new layer was defined for the tools and they were listed under it. Among the unowned code, 916 Rust functions posed the most significant challenge, scattered across 14 different crates, with the largest crate accounting for 15% of the total.

This presented a genuine backlog issue rather than a minor rounding error. The census found that 66% of the code blocks were unowned, prompting a decision to stop measuring the metric, as the sheer volume of work seemed overwhelming. The census also revealed that 916 Rust functions constituted only 15% of the total, highlighting the genuine nature of the issue.

Lastly, the audit found that the original estimate of 653 proof declarations was inaccurate, with three different counting methods yielding varying results (554, 589, and 600). The census highlighted the importance of defining clear denominators and considering multiple approaches when counting, to avoid conflating unrelated findings.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Postgres RLS in Symfony: three green isolation tests, and the UPDATE that moves tenant 1's invoices into tenant 2's books

Two articles ago I wrote that the Postgres role which runs your migrations bypasses every row-level security policy. Last week I wrote that with one tenant in the fixture, your isolation suite passes…

  • Postgres role bypasses row-level security policies during migrations
  • Tenant 1 can move all invoices into tenant 2's books with one SQL statement
  • Fixing policy allows security hole for tenant 1 to move invoices

More from Monday 14 September →