SShortSingh.
Back to feed

Styx's 100% coverage threshold went unenforced because CI never ran coverage

0
·4 views

The core package of Styx had a 100% coverage threshold in its configuration, but CI never executed coverage checks, so nothing enforced it and the selector tests fell short. A pull request added the missing selector behaviour tests and a coverage command to the CI matrix. After the change, 664 tests pass with full statement and branch coverage. Some fallback branches were unreachable, so they were removed rather than covered with contrived tests, leaving observable results unchanged and the code smaller. The author concludes that a threshold only means something once CI runs the command that enforces it, and asks for 100% coverage only on pure logic packages such as state machines, policy and selectors, not UI code.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingHacker News ·

FAA Begins Retiring Decades-Old Floppy Disks From Air Traffic Control Systems

The Federal Aviation Administration has started phasing out floppy disks that have been used in air traffic control operations for decades. Announced by Transportation Secretary Sean P. Duffy, the move is part of a broader effort to modernize aging agency technology. The article provided is only a link to an FAA newsroom release, so details such as the exact timeline, number of systems affected, and replacement technology are not available here. The story was shared on Hacker News, where it drew modest engagement.

0
ProgrammingDEV Community ·

Unchanged 39-of-40 test score hid a shift in which CSV parser case failed

An AI developer built 40 CSV fixtures with literal expected results and ran them through the csv-parse 6.1.0 library via a custom policy adapter. Under default settings one quote-handling case disagreed with its expectation, and relaxing quote handling fixed that case but broke another, so the score stayed at 39 of 40. The author kept the expectations fixed and documented both mismatches, arguing that matching pass totals can conceal a changed behavior contract. The piece recommends recording file acceptance or rejection, exact returned values such as leading-zero identifiers, and parser configuration separately from application import policy. It also notes that the injected-fault and cross-implementation checks give only partial assurance and do not cover production databases or security.

0
ProgrammingDEV Community ·

How Social Engineering Exploits Human Psychology and How to Defend Against It

Social engineering is a cybersecurity threat that targets people rather than software, using psychological manipulation to get victims to reveal confidential information or take harmful actions. Attackers often gather information about their targets first to make their deceptions more believable. Common tactics include creating false emergencies that pressure victims into acting quickly, and pretexting, where the attacker impersonates a trusted authority such as IT staff or an executive. Physical methods like baiting, for example leaving infected USB drives in workplaces, also exploit curiosity to bypass technical defenses. The article uses concrete workplace scenarios to show how these manipulations operate and how individuals can recognize them.

0
ProgrammingDEV Community ·

Why a Typeahead Trie Should Store the Top 10 Completions at Every Node

A system design interview question about search autocomplete asks what a service does when a user types a single character. The naive approach of collecting and sorting every query under a prefix's subtree on each keystroke is correct but too slow at scale. Latency limits of about 0.1 seconds, including network time, make precomputation necessary. Illustrative capacity estimates show reads vastly outnumber writes and that client-side debouncing and caching can cut request volume roughly fourfold. The recommended fix is to precompute the top 10 completions at every trie node during build time, so each lookup only walks the prefix and returns a ready list.