milestone 17: real deadlines, validator holes, upstream editor, trusted proxies, contract samples, badvers
CI / test (push) Successful in 1m22s
CI / test-aarch64 (push) Successful in 4m55s
CI / frontend (push) Successful in 39s
CI / cross (push) Successful in 7m57s
CI / docker (push) Failing after 1h10m42s

This commit is contained in:
2026-08-07 17:55:59 +02:00
parent 9b12dbaaa0
commit c50c6d285a
57 changed files with 2926 additions and 126 deletions
+31
View File
@@ -4,6 +4,7 @@
//! contract as openapi.zig's route guard.
const std = @import("std");
const build_options = @import("build_options");
const docs = @import("docs_files");
const cli = @import("cli.zig");
const routes = @import("web/routes.zig");
@@ -61,3 +62,33 @@ test "every cli subcommand has its own reference heading in docs/reference/cli.m
}
}
}
test "no doc page pastes a concrete version into a transcript" {
const gpa = std.testing.allocator;
// Anchored on the `nxdns ` prefix the transcripts print, not on the bare
// version: a release numbered 1.0.0 would otherwise collide with the
// 1.0.0.1 upstream address the pages use as an example.
const built = try std.fmt.allocPrint(gpa, "nxdns {s}", .{build_options.version_string});
defer gpa.free(built);
for (docs.pages) |page| {
// The literal milestone 14 flagged, checked by name as well, so the
// guard still bites on a page written against the old default after
// `-Dversion-string` moves on.
for ([_][]const u8{ built, "0.1.0-dev" }) |needle| {
if (std.mem.indexOf(u8, page.text, needle) != null) {
std.debug.print("version literal '{s}' in {s}: use the <version> placeholder\n", .{ needle, page.path });
return error.VersionLiteralInDocPage;
}
}
}
}
test "every version transcript prints the placeholder" {
for (docs.version_transcript_pages) |page| {
if (std.mem.indexOf(u8, page.text, "nxdns <version>") == null) {
std.debug.print("transcript placeholder 'nxdns <version>' missing from {s}\n", .{page.path});
return error.VersionPlaceholderMissingFromDocPage;
}
}
}