feat(test,explain,trace): repetition controls, action explanations, Chrome traces
VoidBuildSystem CI / 1 · Requirements (push) Successful in 5s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 1m54s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Successful in 1m50s
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 3m48s
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Successful in 4m8s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Successful in 4m1s
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Successful in 40s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Successful in 16s
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Successful in 19s
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) Successful in 6m56s
VoidBuildSystem CI / 3A · Linux test (debug) (push) Successful in 7m3s
VoidBuildSystem CI / 4A2 · VBS installers (linux target) (push) Successful in 4m31s
VoidBuildSystem CI / 4A2 · VBS installers (windows target) (push) Successful in 3m51s
VoidBuildSystem CI / 5 · Release (push) Skipped

Test runner gains CTest/Meson parity controls: --repeat
until-fail|until-pass|after-timeout[:N], --retry N, --shuffle
[--shuffle-seed N] and --stop-on-failure (which also skips the remaining
profiles).

`vbs explain` answers "why would this action run?" without executing
anything: Execution::explain_graph compares each selected action against
the CAS record (missing record, changed discovered inputs, changed or
missing outputs, restorable outputs, shared-remote-cache hits) and
reports text or JSON.

`vbs build|test --trace FILE` writes a Chrome trace (JSON) with build
phase spans (config, toolchain, eval, snapshot, graph, total) and
per-action spans from the scheduler events.

Verified: new FullV1Tests cases (repetition/shuffle/stop-on-failure and
explain/trace) pass, and the CLI contract suite passes.
This commit is contained in:
faumaray committed 2026-12-06 16:50:38 +03:00
1 parent a3afca0e5f
commit 2dec3e9259
5 files changed
+818 -33

No files matched your search

@@ -62,6 +62,30 @@ struct ExecutionReport {
std::string diagnostic;
};
// Why an action would run (or be reused) on the next build: the explain report answers
// "what changed?" without executing anything.
struct ActionExplanation {
std::string action_id;
std::string target_name;
std::string label;
std::string action_key;
std::string command;
bool cacheable{true};
bool would_run{false};
bool restorable{false}; // outputs can be restored from the CAS without executing
bool remote_hit{false}; // a shared remote cache holds this action
std::string reason;
std::vector<std::string> changed_inputs;
std::vector<std::string> changed_outputs;
};
struct ExplainReport {
std::size_t total{0};
std::size_t up_to_date{0};
std::size_t would_run{0};
std::vector<ActionExplanation> actions;
};
// Parses a GCC/Clang GNU Make depfile (.d) into its list of dependency file paths.
[[nodiscard]] Void::Result::Result<std::vector<std::filesystem::path>, Void::Result::Error>
parse_depfile(const std::filesystem::path &depfile_path);
@@ -72,4 +96,11 @@ parse_depfile(const std::filesystem::path &depfile_path);
execute_graph(const Graph::BuildGraph &graph, State::StateStore &state,
const ExecutionOptions &options = {}, std::stop_token stop = {});
// Explains, without executing anything, why each selected action would run or be reused:
// cache-record presence, changed discovered inputs, changed/missing outputs, and whether a
// shared remote cache holds the action.
[[nodiscard]] Void::Result::Result<ExplainReport, Void::Result::Error>
explain_graph(const Graph::BuildGraph &graph, State::StateStore &state,
const ExecutionOptions &options = {});
} // namespace Void::Build::Execution