Crossweft / Updates / v0.2.9
UPDATE · v0.2.9 ·

Validators in the stop hook rerun only what changed

`crossweft validators --incremental` reuses a passed run while nothing it read has changed; a retired route that answers 410 can now be mapped with `gone`.

Two changes: a faster validator run for the stop hook, and a way to map a route you retired on purpose.

crossweft validators --incremental. A full validator suite can take many minutes, too long to run every time an agent stops. With --incremental, each phase of a validator (its self-test and its normal run) that passed last time is reused while nothing it observed has changed. Crossweft learns what a phase observed by tracing it with Python audit hooks, also inside the Python processes it starts: the bytes of the files it read, the directories it listed, the paths it checked, the environment variables it read, the output of the read-only git commands it ran, the validator itself and the runtime.

When the tracer cannot see everything, the phase runs again. A phase that starts any other program, forks, opens a socket, uses a database driver or ctypes, or has a Python child that did not report what it read is never reused. Failures are never kept, and a kept phase expires after 24 hours. The report marks the reused rows, says why a kept phase ran again (the first input that changed), and names every phase that could not be kept, with the reason.

On one of our repositories with 52 validators, the cold run took 2704 s; a repeat with nothing changed took 162 s, with 93 of the 104 phases reused.

The stop hook is a convenience: CI keeps running plain crossweft validators. Validators see CROSSWEFT_VALIDATORS_INCREMENTAL=1 during an incremental run.

gone on legacy links. A route you retired but still serve on purpose, so old clients get a clear 410 Gone instead of a 404, can now be mapped on a legacy link with {"status": 410, "replaced_by": "<current link>"}. It no longer needs a route:unmapped finding. Removing that tombstone route is reported as route:gone-unserved, and live code that still calls it as route:gone-called.

Source: v0.2.9 · CHANGELOG.md

← v0.2.8