SShortSingh.
Back to feed

rootstock: a single-binary Rust tool that keeps projects in sync with their templates

0
·3 views

The author, a Rust developer, wanted a single-binary alternative to Python-based Copier for project templates. Most template tools only render files once, leaving projects drifting from later template changes. rootstock records the template source, version, answers and generated files in a .rootstock.toml file, then replays template updates by three-way comparison against the project. Conflicting text is merged via git merge-file, while unmergeable cases such as edited binaries are kept side by side or reported. Human-action cases exit with code 2 and a line per problem, making the tool easy to automate.

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 ·

FINDR AI Open-Source Tool Targets GPS Spoofing in Parcel Delivery Tracking

FINDR AI is an open-source system built to detect suspicious location manipulation in e-commerce parcel delivery, where GPS coordinates can be misleading. It flags GPS spoofing, physically impossible teleportation jumps, and gradual location drift, then assigns risk scores to suspicious telemetry. The system adds investigation workflows, human approval for critical rescue actions, and hash-chain audit logging for traceable decisions. Built in Python with Streamlit, FastAPI, MongoDB Atlas, and SQLite, it was submitted to the Hacktoberfest Open-Source AI Challenge and reports 105 passing regression tests.

0
ProgrammingDEV Community ·

Debugging Malformed JSON From an Email Send API After Payment

The article advises validating the exact request payload against the provider's documented schema before sending, rather than assuming the response is at fault. It recommends checking the HTTP status before parsing the body, since an HTML gateway error or empty response can cause a JSON decoding failure. Retries should use a stable idempotency key and a policy keyed to status codes, to avoid duplicate sends and redundant payloads. The author also proposes splitting retention, keeping operational metadata and a payload hash longer while shortening retention of sensitive receipt content. The overall guidance is to log request bytes, status, content type, and a size-limited raw body separately from parser errors.

0
ProgrammingDEV Community ·

DraftMark uses a model to write ship survey code, checked against a printed booklet

A developer built DraftMark for the Meta AI Developer Hackathon to time-average a ship's moving waterline from video and have a model generate per-ship draft survey programs. Rather than trusting the model's output, the author tested the generated program against 22 worked loading conditions printed in a Ro-Ro ship's stability booklet, requiring agreement within 0.1 percent. A verbatim implementation of the booklet's procedure matched only 14 of 22 rows, because it omitted a second trim correction and contained unstated conventions. After two regenerations with feedback on failing rows, the model's program reproduced all 22 conditions. The finished survey was also checked on one in-sample row, landing about 0.01 percent from the printed value.

0
ProgrammingDEV Community ·

Adversarial test pairs reveal when agent caches serve wrong write actions

Hit-rate benchmarks show how often an agent cache helps but not when it causes harm, and replaying the wrong write step, such as deactivating instead of activating, can outweigh any token savings. The author proposes an adversarial eval built from near-opposite command pairs that share wording and structure but differ in one consequential verb. Embedding similarity tracks topic rather than polarity, so a threshold-only cache scored 1 of 18 false positives on this set, while a gated engine that replays write-containing trajectories only on exact repeats scored 0. The author recommends running such an eval as a CI gate so that threshold or model changes cannot silently reintroduce the failure. The method is presented as portable to other domains, though the 18-pair set itself is only a template and says little about any particular traffic.