test(session-net): isolate connection metrics assertions - #692
Draft
VerifiedOrganic wants to merge 3 commits into
Draft
test(session-net): isolate connection metrics assertions#692VerifiedOrganic wants to merge 3 commits into
VerifiedOrganic wants to merge 3 commits into
Conversation
Signed-off-by: agent-codex <verifiedorganic@sent.com>
Signed-off-by: VerifiedOrganic <verifiedorganic@sent.com>
Signed-off-by: VerifiedOrganic <verifiedorganic@sent.com>
This was referenced Aug 16, 2026
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.
Summary
METRICSincrement and classification unchanged.Refs #576
Exact revision
92de6656dfe4ab857242ca0a0380167116ab53b048cc612a8bd5beddceff7cbb42ade53abee7f8cf9c41765bf5987c5bfc5d9877a24a95c8a45db1121a7b4622c72e1a660a2e0434f716dd5155372fe7537f4c518f57c986a9090da93776362a76ee60d2eea3557e6d5c83b7cdff9360fe8583aa0531dd25origin/mainfetched with prune):9b85ae1f8a98f5fe9f9f77225f72e5364840b5b14cb0806bd910c32a3693dfa4f3237360c0f4385e7a627224ee4b7d547c729323a26634254c3d7c42dfd83e68690f8b5a521311ee328bcab7ac375a54537f4c518f57c986a9090da93776362a76ee60d2and9b85ae1f8a98f5fe9f9f77225f72e5364840b5b1fix/576-metrics-test-race-wm-20260815The RED commit predates the manager's identity correction and intentionally retains the inherited
agent-codex <verifiedorganic@sent.com>author/committer and sign-off. It was preserved without rewriting. The implementation and reconciliation merge commits are authored, committed, and signed off byVerifiedOrganic <verifiedorganic@sent.com>.origin/mainmerged normally with no conflicts. Its aggregate delta touched onlyCHANGELOG.md,crates/opc-session-net/src/consumer.rs, andcrates/opc-session-net/tests/stateless_quorum_consumer.rs; none overlaps the issue implementation. The PR diff against current main remains the same five issue-owned files.Changed files
crates/opc-session-net/src/consensus.rscrates/opc-session-net/src/lifecycle.rscrates/opc-session-net/src/server.rscrates/opc-session-net/src/test_support.rscrates/opc-session-net/tests/authenticated_replica_identity.rsCounter ownership inventory
The affected process-global family contains 24 counters: eight retirement reasons, two lifecycle gauges, three drain counters, nine connection-outcome counters, and two reconnect counters.
Arcat construction, so a final drop from an aborted or handed-off task remains owned by the originating test. Unrelated spawned test writers do not inherit the task-local.rotation_bootstrap_retirementis a separate integration binary with exactly one top-level test; all raw-global helpers are awaited serially in that process.authenticated_replica_identityreads maximum-age/local-leaf/peer-leaf retirement counters. Its two reader tests and the one indirect real-mTLS leaf-expiry writer share one integration-test-local Tokio mutex.Deterministic RED and mutation
RED at
9c41765b:Result: exit 101, 0 passed / 1 failed / 203 filtered. A spawned writer outside the old lock boundary plus the assertion-owned writer produced idle retirement/drain deltas of
2while the assertion required1.Fix-removal mutation: temporarily disabled lifecycle capture of the scoped accounting. The same deterministic test failed with observed
0versus expected1. The mutation was restored, and the final test passed.Focused verification
All current-head commands ran through the shared heavy lock where applicable, used repository-default build parallelism, and used no Cargo target/cache/wrapper/job overrides.
opc-session-netsuite: 315 passed, 0 failed; doc tests passed.opc-session-netsuite at four-way test parallelism: 319 passed, 0 failed; doc tests passed.cargo clippy --locked -p opc-session-net --all-targets --all-features -- -D warnings: passed.Exact repository gates
cargo fmt --all --check: passed.git diff --check: passed.cargo clippy --locked -p opc-persist --all-targets --no-default-features -- -D warnings: passed.cargo test --locked -p opc-persist --no-run: passed.opc-persistintegration binaries with--test-threads=1: 38 passed, 0 failed.cargo clippy --workspace --all-targets --all-features -- -D warnings: passed.cargo test --workspace --all-features --quiet -- --test-threads=4: passed with status 0; prescribed privileged tests remained ignored./usr/local/go/bin/go vet ./...and/usr/local/go/bin/go test ./...: passed with Go 1.26.6.kubectl kustomize operators/sdk-reference-operator/config/default: passed.Adversarial review
P0: none. P1: none. P2: none.
The implementation review found no deadlock, poisoning, async-lock misuse, task-local/final-drop attribution error, cross-test leakage, current reader/writer gap, or production behavior change. The remaining integration mutex is a Tokio mutex, is acquired only at three top-level test boundaries, and has no nested acquisition.
The current-main delta review also found no P0/P1/P2 issue or ownership overlap. Its new consumer integration tests indirectly exercise ordinary production counters only in their separate test binary and do not add a global-counter reader.
Hosted status
537f4c518f57c986a9090da93776362a76ee60d2: the preserved initial snapshot at2026-08-15T23:13:38Zwas 36 total, 24 passed, 12 pending, 0 failed or cancelled. The terminal result was 37/37 successful, last completion at2026-08-15T23:19:48Z.7a627224ee4b7d547c729323a26634254c3d7c42: terminal at2026-08-16T03:18:54Z; 37/37 passed, 0 failed, 0 cancelled, 0 skipped. The aggregateRust workspacecheck passed.The PR remains open and draft.
Exclusions