mirror of
https://github.com/morluto/rea.git
synced 2026-11-16 19:53:50 +00:00
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:
1 parent
0a9e736aea
commit
acb10754c1
9 files changed
+71
-23
No files matched your search
@@ -59,7 +59,7 @@ reported as a config. When `IKCFG_ST`, gzip magic, and a later `IKCFG_ED` frame
|
||||
a member that does not decode, a deflate stream cut off by that marker, a
|
||||
member that fails its CRC-32 or ISIZE check, or text that fails the grammar,
|
||||
the config is `malformed` with coverage
|
||||
`incomplete`, and `marker`, `gzip`, and `end_marker` locate the blob. A
|
||||
`unknown`, and `marker`, `gzip`, and `end_marker` locate the blob. A
|
||||
malformed blob is never reported as an absent config. A valid config later in
|
||||
the searched bytes still wins. `marker`, `gzip`, and `end_marker` give
|
||||
the three ranges. `sha256` hashes the inflated text. `option_count` counts
|
||||
@@ -115,7 +115,8 @@ times `max_config_bytes` of output across them. A candidate whose stream fails
|
||||
partway through is charged its full per-candidate allowance, since its partial
|
||||
output is not measured. When that search budget runs
|
||||
out before a config is accepted, the config is `incomplete` with reason
|
||||
`config_search_exhausted` instead of failing or reporting an absent config.
|
||||
`config_search_exhausted` and coverage `partial` instead of failing or
|
||||
reporting an absent config.
|
||||
Inflation runs off the event loop. Every scan, including marker
|
||||
searches that find nothing, config text checks, validation of one long value,
|
||||
and hashing, yields to it at least once
|
||||
@@ -124,7 +125,11 @@ at the next check. One inflate call runs to its output bound once started.
|
||||
|
||||
Results that could not search or read the kernel bytes stay `incomplete`,
|
||||
`malformed`, or `unsupported` and are never
|
||||
reported as an absent config:
|
||||
reported as an absent config. `coverage.status` is `partial` when the config
|
||||
is known to extend past what was examined (`config_gzip_truncated`,
|
||||
`config_search_exhausted`), `unknown` when a framed config is malformed or the
|
||||
payload could not be searched (`examined_bytes` is 0), and `unsupported` for a
|
||||
payload codec REA does not inflate:
|
||||
|
||||
| `config.reason` | Meaning |
|
||||
| ---------------------------------- | ---------------------------------------------------------------------------- |
|
||||
|
||||
@@ -50,7 +50,9 @@ these files.
|
||||
page size. The config search inflates at most 16 candidates and at most
|
||||
four times `max_config_bytes` in total, charging a stream that fails
|
||||
partway through its full per-candidate allowance. Exhausting the search budget is
|
||||
`incomplete` with `config_search_exhausted`. A member past
|
||||
`incomplete` with `config_search_exhausted` and coverage `partial`; a
|
||||
member cut by the searched bytes is also `partial`. A malformed framed
|
||||
config, or a payload that could not be searched, has coverage `unknown`. A member past
|
||||
`max_config_bytes` fails the budget only when no later candidate is
|
||||
accepted.
|
||||
8. Cancellation is checked between candidates, between banner hits, while
|
||||
|
||||
Reference in new issue
Block a user