Repository navigation
fix(process): validate saved inputs before output writes - #13
Merged
Merged
Conversation
Signed-off-by: stacknil <219124580+stacknil@users.noreply.github.com>
Signed-off-by: stacknil <219124580+stacknil@users.noreply.github.com>
Signed-off-by: stacknil <219124580+stacknil@users.noreply.github.com>
stacknil
marked this pull request as ready for review
October 21, 2026 11:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Saved procfs/SS FIFO inputs can block waiting for a writer. On native Linux, an invalid UTF-8
exelink target also survives baseline parsing and raisesUnicodeEncodeErrorafter truncating a previously valid snapshot. Existing read errors lack consistent PID/field context, and snapshot/diff output filesystem failures escape as tracebacks.Base:
1d31d4287036cf2bbd3aeb8059d7d332bedef598. Final reviewed tree:0c0969c6f0c276ed1be95a66cd020a1be89efa00.Invariant
Reject incomplete or unsupported required saved inputs before snapshot artifact writes; preserve existing evidence on input-validation failure. Keep successful
stacknil.system-evidence.v1output, adapter fields, observation-time meaning and same-boot identity limits unchanged.Design decision
ValueErrorclassification.input=output, separate from evidence-input failures. Writes remain sequential and can partially update outputs if a later write fails.Threat/failure model
This is an offline lab for trusted, stable local saved exports. It does not establish a path sandbox, authenticated provenance, live acquisition, complete numbered-entry inventory, atomic acquisition, or a general filesystem timeout. Broken numeric directory links and numeric non-directory entries retain the existing ignored-entry profile. Filesystem/UTF-8 diagnostics avoid copying raw field contents; existing malformed-value parser messages can still include the offending value.
Rejected alternatives
Compatibility
Six process-lab files only; no schema, adapter, golden, dependency or CI changes. All seven regenerated producer artifact bytes match the base Git goldens on Linux, including the exact JSONL contract. No consumer migration for successful artifacts; diagnostic strings gain context and output failures become structured.
The unmodified reviewed telemetry-lab PR #97 runner (
bbe483eb43ca11bd54c3ffe609e369abc2850980) independently passed twice on native ext4 with the producer fixed at the base above. The changed producer then fed the reviewed consumer twice: seven events, one window, eleven numeric features, four sources, seven targets and zero default-rule alerts; four schema validations and six PNG smoke checks. Existing telemetry-lab #97, Website #3 and Profile #4 remain untouched.Validation
pip check.python -m pip install -e ".[dev]",python -m pytest tests/test_native_read_failures.py -v,python -m pytest -q; disposable native source copies and the reviewed integration runner provide the additional mutation/integration checks. Full local receipts remain outside Git.Rollback
Revert this three-commit PR as one unit. No data migration, golden refresh or dependency rollback is required. Reverting restores the original FIFO and invalid-link failure behavior.
Draft / no merge in Round 3. Input-admission and diagnostics review hold: at least 24 hours after the final change. Last change:
2026-10-20T17:53:24+08:00; earliest eligibility:2026-10-21T17:53:24+08:00(2026-10-21T09:53:24+00:00UTC). Any later change restarts the hold. Eligibility does not authorize merging in this round. No release, tag or deployment.