ek9_query_build_status
Answers first: programState, queriesReliable with its reason, buildOutcome, lastPhaseReached, then sourceCount/sourcesClean/sourcesWithErrors and sources[] with per-file error and warning counts.
When to use it
Has the workspace compiled, and can the query tools be trusted right now - one call, no arguments (fileFilter narrows the per-source list).
When not to use it
- The LIST of errors/warnings rather than build-state metadata - use
ek9_query_diagnostics. - You want to TRIGGER a compile, not query existing state - use
ek9_compile. - You want the structural inventory (constructs, modules) - use
ek9_query_workspace. - You want the compiler binary version, not workspace build state - use
ek9_version.
Details
A gate-check that always succeeds at any phase — the result IS the report. queriesReliable is true once the compile reached PRE_IR_CHECKS (the phase that builds the call graph and the metrics the symbol-anchored query tools read); reason names the phase reached. buildOutcome is success (no source has errors), partial-success (some sources clean) or failure; programState is the shared clean / partial / unavailable envelope every architecture enquiry carries.
Arguments
| Argument | Type | Required | What it is |
|---|---|---|---|
fileFilter | string | Optional: keep only sources whose path contains this text |
Recorded calls
Real calls, recorded against small projects and checked on every build - a changed answer fails it.
Build status shape
Request
{ }
Response
{
"buildOutcome" : "success",
"lastPhaseReached" : "PRE_IR_CHECKS",
"meta" : {
"serverMs" : "<timing>"
},
"phaseNumber" : 9,
"programState" : "clean",
"queriesReliable" : true,
"reason" : "reached PRE_IR_CHECKS",
"sourceCount" : 1,
"sources" : [ {
"file" : "MyRecord.ek9",
"hasErrors" : false,
"hasWarnings" : false,
"warningCount" : 0
} ],
"sourcesClean" : 1,
"sourcesWithErrors" : 0,
"totalPhases" : 23
}