Repository navigation
Conversation
…ceopen-review-questions
Fix 1 (has_rotation_failure_signature breadth):
Remove the over-broad `starts_with("failed ")` and `starts_with("unhandled ")`
arms from `rotation_header_states_failure`. Any ISO-8601 log with a line like
"2026-07-30T10:15:00Z Failed to load configuration." would previously route
the entire file to the Device Inventory rotation-failure parser. Only the
rotation-specific phrases (failed to rotate / rotation failed / failed to roll)
and .NET exception evidence are retained. Two negative tests cover the removed
arms.
Fix 2 (continuation size asymmetry):
Add MAX_CONTINUATION_BYTES = 1 MiB to inventory/mod.rs, mirroring
MAX_PENDING_LOGICAL_RECORD_BYTES in watcher/tail.rs. parse_records now caps
accumulated continuations at the same bound: when appending a continuation
would exceed 1 MiB, the current record is force-completed and a new orphan is
started (oversized single lines are truncated at the byte boundary). Two tests
verify that both RotationFailure and Harvester dialects respect the cap.
Copilot
AI
changed the title
[WIP] Resolve open questions from review comment on intended behavior
fix(intune): narrow rotation-failure detection and cap parse_content continuation size
Aug 3, 2026
This was referenced Aug 5, 2026
Owner
|
Architecture audit split #452 into #506 (rotation detection) and #507 (shared bounded framing). This draft is not a merge candidate: its predicate narrowing is useful evidence for #506, but its framing half duplicates the production limit/algorithm, truncates oversized input, and does not establish lossless open-versus-tail equality. #506 will implement the small predicate correction first; #507 will replace the duplicated/unbounded paths with one shared lossless framer. Closing this draft unmerged rather than polishing a stopgap. |
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.
Two correctness gaps from the PR #397 review: over-broad rotation-failure detection routing unrelated ISO-8601 logs to the Device Inventory parser, and a 1 MiB framing bound that only the tail path enforced (opening vs. tailing a file with a large record produced different framing).
Fix 1: Narrow
rotation_header_states_failureRemoved the
starts_with("failed ")andstarts_with("unhandled ")arms. These would route any ISO-8601 log with a genericFailed to …header line to the rotation-failure parser. Only rotation-specific phrases are retained:.NET exception evidence (the other detection path in
has_rotation_failure_signature) is unchanged. Two new negative tests cover the removed arms.Fix 2: Apply 1 MiB continuation bound in
parse_recordsAdded
MAX_CONTINUATION_BYTES = 1 MiBtoinventory/mod.rs, mirroringMAX_PENDING_LOGICAL_RECORD_BYTESinwatcher/tail.rs. When appending a continuation line would push the accumulated message over the cap,parse_recordsforce-completes the current record and starts a new orphan—matching the tail path's split behavior. Oversized single continuation lines are also truncated at the Unicode character boundary. Two new tests verify the cap holds for both RotationFailure and Harvester dialects.