feat(p2): v3 usmStats Report detection and auto-resync/retry - #23
Merged
Conversation
A v3 agent answers an out-of-sync request with a Report PDU naming a usmStats counter (e.g. notInTimeWindow, unknownEngineID) plus its authoritative engine params. Model these so a manager can recover instead of surfacing an auth error. - v3/report: USM_STATS_BASE + UsmStat enum (from_oid? / resyncable?) - v3/security: ReportError carrying the usm_stat - v3/message: report? / usm_stat predicates - v3/session: resync_from updates engine id / boots / time from a Report - spec: v3_report_spec covers OID mapping, resyncable set, detection, resync Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
On a recoverable usmStats Report (notInTimeWindow / unknownEngineID) the client now resyncs the engine params from the report and retries the request exactly once; a non-recoverable Report, or one that survives the retry, raises Security::ReportError. - client: request/transceive helpers centralise probe + send/parse + the resync-and-retry-once loop; the get/get_next/get_bulk/set send methods route through them Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
64 tasks
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.
Third slice of the P2 (protocol completeness) group (#7). Follows #21 (read/bulk) and #22 (write).
Problem
A v3 agent answers an out-of-sync request with a Report PDU naming a usmStats counter (
notInTimeWindow,unknownEngineID, …) plus its authoritative engine params. Today that surfaces as a bare auth failure with no recovery, so a boots/time drift or an agent reboot breaks subsequent requests until the session is manually rebuilt.Commits
feat(v3): detect usmStats Report PDUs and resync engine paramsUsmStatenum +USM_STATS_BASE,from_oid?(tolerates the.0instance suffix),resyncable?(onlynotInTimeWindow/unknownEngineID).Security::ReportErrorcarrying theusm_stat.V3::Message#report?/#usm_stat;V3::Session#resync_fromupdates engine id / boots / time from a Report.feat(client): auto-resync and retry once on a v3 Reportrequest/transceivehelpers centralise the discovery probe + send/parse and the resync-and-retry-once loop. A non-recoverable Report, or one that survives the retry, raisesSecurity::ReportError. The get/get_next/get_bulk/set send paths route through them.Note
This composes with the RFC 3414 time-window enforcement from #20: an authenticated
notInTimeWindowReport already has its boots/time absorbed bycheck_timeliness;resync_fromadditionally covers the unauthenticatedunknownEngineIDcase, and the client drives the retry.Tests
v3_report_spec(OID mapping, resyncable set,report?/usm_stat,resync_from) — offline. The client retry loop is socket glue, exercised by thee2esuite. Deterministic 75/75, multi-threaded 75/75, legacy 3/3, ameba clean, format clean; commits bisect-clean.Tracked in #7. Remaining P2 slices: HC counters / ifXTable → trap/inform sending.
🤖 Generated with Claude Code