SShortSingh.
Back to feed

Scan of 139 Popular JS/TS Repos Finds Only One Passes Basic GitHub Actions Checks

0
·3 views

A developer building a GitHub Actions linter tested it on 149 popular JavaScript and TypeScript repositories with 1,000 to 20,000 stars, 139 of which had workflows. The review checked three basic items: dependency caching, concurrency settings on pull request runs, and job timeouts. Most repos lacked a concurrency group, and 61% of CI jobs had no timeout set, leaving them open to running for up to six hours. Only one repository passed all three checks, and the author notes the results reflect how easily these defaults are overlooked rather than criticizing the projects. The author acknowledges biases in the sample, such as its limitation to public open source projects, and has published the method and raw data alongside a free scoring tool.

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
ProgrammingDEV Community ·

Krea 2 cleanup in ComfyUI: one shared recipe across three input and output setups

Three Krea 2 cleanup workflows in ComfyUI follow the same skeleton: reverse-prompting the input image, rebuilding it through three depth-structure passes with one shared LoRA, then upscaling with 4x-UltraSharp. The variants differ only in I/O, covering a single image, a local folder loop, and a RunningHub ZIP batch. All three use the same Krea 2 Turbo model, text encoder and VAE, with 8-step KSampler passes and a console that selects render stages, the final long edge, and the reverse-prompt route. The single-image graph is presented as the clearest example, and the author suggests a 2048-pixel long edge as the best value for cost, though this is guidance rather than a measured benchmark. The source also notes that the in-graph label on the batch variant is outdated, so the node graph should be trusted over the note text.

0
ProgrammingDEV Community ·

Per-customer budget caps for Claude API calls, with prompt caching priced correctly

A developer guide explains why Anthropic's console limits don't suit products serving many customers, since they cannot isolate one heavy account. It proposes a per-customer monthly spending cap for the Messages API, implemented in TypeScript with Redis. The key cost pitfall is that the usage field's input_tokens excludes cached reads and cache writes, which must be priced separately or costs are undercounted. The approach includes a price table per model, a cost function that splits 5-minute and 1-hour cache writes, and throws on unknown models so new ones are not silently priced at zero. The article notes that batch discounts, long-context tiers and server-tool fees are not modeled, so the resulting cap is a floor rather than a ceiling.

0
ProgrammingDEV Community ·

Tracking LLM spend per customer in Node.js using AsyncLocalStorage

A common problem is that an OpenAI invoice shows total spending but not which customer generated it, which matters for flat-priced plans. The article proposes attaching a customer ID to the request's async context once, through middleware, instead of threading it through every function. Developers can wrap the OpenAI client so each call reads that context and records its cost, with feature tags added via nested context scopes. Background jobs can start their own context tied to the relevant customer. Costs are converted to dollars at write time using a dated price table, with attention to cached input tokens billed at a lower rate.

0
ProgrammingDEV Community ·

fold() vs reduce() in Kotlin: How the Starting Accumulator Shapes Android Code

The article contrasts Kotlin's fold() and reduce(), which both collapse a collection into a single value but differ in how they begin. fold() takes an explicit seed, so its result type can differ from the element type, while reduce() starts from the first element and requires a compatible type. The author illustrates this with a download-sync example that sums byte counts both ways and builds a transfer report from a list of parts. The piece also notes that reduce() suits merging same-shaped values, such as combining time windows into one covering window. It highlights failure modes like empty collections causing exceptions and overflow in byte totals, all tied to the choice of seed.