Skip to content

fix flakey test - #3104

Open
UnArbosSix wants to merge 1 commit into
mainfrom
fix-flakey-unittest
Open

fix flakey test#3104
UnArbosSix wants to merge 1 commit into
mainfrom
fix-flakey-unittest

Conversation

@UnArbosSix

@UnArbosSix UnArbosSix commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Motivation

The inner_ciphertext_unwraps_user_data_envelope unit test constructed its fixture through randomized timelock encryption even though it only tests SCALE envelope decoding. That unnecessary encryption step made the test nondeterministic and potentially flaky.

Changes

  • Construct a deterministic SCALE-encoded UserData fixture directly.
  • Verify that inner_ciphertext returns the embedded ciphertext bytes.
  • Preserve coverage that rejects trailing bytes after the encoded envelope.

Behavioral impact

This changes test code only. Production behavior, runtime state, migrations, and spec_version are unaffected.

Testing

  • git diff --check passed.
  • cargo fmt --check --all could not run in the review environment because rustup's directory was read-only.

@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
subtensor Ready Ready Preview Aug 21, 2026 3:55pm

Request Review

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🛡️ AI Review — Skeptic (security review)

VERDICT: SAFE

HIGH scrutiny: account is under 90 days old, but has write permission and substantial merged subtensor work; author and committer match, with no Gittensor association found. Branch: fix-flakey-unittest → release-448.

The sole change replaces a network- and randomness-dependent encryption test setup with a deterministic SCALE-encoded UserData fixture. It remains confined to test code and preserves coverage of envelope extraction and trailing-byte rejection. No AI-review trust-boundary files are changed.

Findings

No findings.

Conclusion

No malicious behavior or security vulnerability was found in this small, deterministic test-only change.


🔍 AI Review — Auditor (domain review)

VERDICT: 👍

HIGH scrutiny: Gittensor association UNKNOWN; account is under 90 days old, but has repository write permission and substantial merged subtensor contributions.

PR body was empty/trivial; the Auditor has auto-filled it. Please review.

The deterministic SCALE-encoded fixture directly exercises inner_ciphertext and preserves trailing-byte rejection coverage while removing the test's unnecessary randomness dependency. No runtime behavior changes.

git diff --check passed. cargo fmt --check --all could not run because the existing Rust toolchain attempted to write under the read-only rustup directory; no dependencies were installed and no files were modified.

Findings

No findings.

Conclusion

This is a minimal, correct test-only change that removes a source of flakiness without weakening the behavior under test.

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@UnArbosSix
UnArbosSix changed the base branch from release-448 to main August 21, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant