refactor(native)!: report kernel build config coverage as partial or unknown instead of incomplete (#11486)

inspect_kernel_build_config coverage.status was `incomplete` for a config cut by the
searched bytes or a budget-stopped search (known gaps), for a malformed framed
config, and for a payload that was never searched (examined_bytes 0). Coverage
now uses the shared status: `partial` for the known gaps, `unknown` when a
config's existence or contents cannot be determined; `unsupported` is
unchanged. config.status keeps its own values, and the service's consistency
check pairs each config state with its coverage.

BREAKING CHANGE: inspect_kernel_build_config `coverage.status` reports `partial`
(config_gzip_truncated, config_search_exhausted) or `unknown` (malformed config,
payload not searched) instead of `incomplete`.
This commit is contained in:
morluto authored and GitHub committed 2026-11-16 05:01:36 +08:00
1 parent 0a9e736aea
commit acb10754c1
9 files changed
+71 -23

No files matched your search

@@ -144,6 +144,26 @@ it.each([
};
},
],
[
"a malformed config reported as a partial gap",
async (): Promise<KernelBuildConfig> => {
const malformed = await reportOf(nonConfigGzipFixture());
return {
...malformed,
coverage: { ...malformed.coverage, status: "partial" },
};
},
],
[
"a truncated config reported with unknown coverage",
async (): Promise<KernelBuildConfig> => {
const truncated = await reportOf(truncatedKernelConfigFixture());
return {
...truncated,
coverage: { ...truncated.coverage, status: "unknown" },
};
},
],
[
"an incomplete config carrying a malformed reason",
async (): Promise<KernelBuildConfig> => {
@@ -260,11 +260,13 @@ const searchedAgrees = (report: KernelBuildConfig): boolean => {
if (report.banner.status === "unknown") return false;
if (report.config.status === "present" || report.config.status === "absent")
return report.coverage.status === "complete";
// A cut or budget-stopped config is a known gap; a malformed one is unreadable.
if (report.coverage.examined_entries !== 0) return false;
if (report.config.status === "incomplete")
return report.coverage.status === "partial";
return (
(report.config.status === "incomplete" ||
report.config.status === "malformed") &&
report.coverage.status === "incomplete" &&
report.coverage.examined_entries === 0
report.config.status === "malformed" &&
report.coverage.status === "unknown"
);
}
if (
@@ -279,7 +281,7 @@ const searchedAgrees = (report: KernelBuildConfig): boolean => {
report.config.status === "unsupported"
);
return (
report.coverage.status === "incomplete" &&
report.coverage.status === "unknown" &&
report.config.status === "incomplete"
);
};