P6 + P1: live snmpd in CI, coverage gaps, dead nil-guards - #29
Merged
Conversation
with_socket returns the block's value (or raises), so the msg-nil?-raise pattern around every public method was unreachable. Return the block value directly. - client: get / get_next / get_bulk / set / send_inform simplified Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- spec/varbind_from_value_spec: String/Int/Bool/Nil/BER/VarBind branches plus the unsupported-type ArgumentError - spec/data_types_spec: set_unsigned64/32 padding: false (minimal encoding) and the padded round-trip Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The e2e suite had no server in CI and the three v3 live specs were pending
("not sure how to configure SNMPv3 on the simulator"). Provision a real
net-snmp agent instead — verified against brew net-snmp 5.9.5.2 (macOS) and
Ubuntu 24.04 snmpd (incl. the DES user and the OpenSSL legacy provider).
- spec/support/snmpd.conf: unprivileged test agent on 127.0.0.1:16161 — v2c
public, the sysContact the specs assert, and the three v3 users
(usr-md5-none / usr-md5-aes / usr-md5-des)
- spec/helper: TEST_SNMP_PORT (default 161); snmp_spec/client_spec use it
- snmp_spec: un-pend the three v3 live specs; the SET spec now asserts the
real agent behaviour (noAccess(6), error-index 1 — exercising non-zero
error-status/index decoding live)
- mise: dev:spec-e2e activates the OpenSSL legacy provider (DES); new
dev:snmpd task runs the test agent locally
- ci: Linux (apt) and macOS (brew) jobs start the agent and run
dev:spec-legacy + dev:spec-e2e on every build
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.
The P6 (test gaps) group plus the last P1 item from the audit (#7).
Commits
refactor(client): drop the dead nil-guards(P1) —with_socketreturns the block's value (or raises), so theraise … if msg.nil?pattern around every public method was unreachable. Return directly.test: cover VarBind.from_value branches and set_unsigned padding— the String/Bool/Nil/BER/VarBind/unsupported branches ofVarBind.from_value, and theset_unsigned64/32 padding: falseminimal-encoding path.ci: run the legacy and live (snmpd) spec suites— the e2e suite had no server in CI and the three v3 live specs werepending!since the snmpsim days. The CI now provisions a real net-snmp agent:spec/support/snmpd.conf: unprivileged agent on127.0.0.1:16161— v2cpublic, thesysContactthe specs assert, and the three v3 users (usr-md5-none/usr-md5-aes/usr-md5-des).dev:spec-e2e).noAccess(6), error-index 1 — which also exercises non-zero error-status/index decoding against a live agent.snmpd) and macOS (brewnet-snmp) jobs start the agent and rundev:spec-legacy+dev:spec-e2eon every build. Newdev:snmpdmise task for running the agent locally.Verification
Most other P6 items (error-status decoding, Counter64 bounds, walk boundary, ifType fallback, contextName, fuzz, v2 trap round-trips) were already covered by the specs added throughout the audit PRs — checked off in #7 with their PR links.
Tracked in #7.
🤖 Generated with Claude Code