Skip to content

tests: dynamically search for deep mutable properties#1340

Merged
jansegre merged 1 commit intomasterfrom
tests/check-mutable-properties
Aug 1, 2025
Merged

tests: dynamically search for deep mutable properties#1340
jansegre merged 1 commit intomasterfrom
tests/check-mutable-properties

Conversation

@jansegre
Copy link
Member

Motivation

We recently fixed some mutability cases exposed to blueprints, namely some self.syscall.rng.* cases. But we don't have a test that dynamically checks for attributes that are possible to mutate.

Acceptance Criteria

  • Create a blueprint (with special access to dir builtin and try blocks) that does a search starting from self and ctx: Context looking for attributes (including nested attributes) that would be possible to be changed from normal blueprint code (either overwritten with a new value or deleted).

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@jansegre jansegre requested review from glevco and msbrogli July 30, 2025 19:07
@jansegre jansegre self-assigned this Jul 30, 2025
@jansegre jansegre moved this from Todo to In Progress (Done) in Hathor Network Jul 30, 2025
@github-actions
Copy link

github-actions bot commented Jul 30, 2025

🐰 Bencher Report

Branchtests/check-mutable-properties
Testbedubuntu-22.04
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
minutes (m)
(Result Δ%)
Lower Boundary
minutes (m)
(Limit %)
Upper Boundary
minutes (m)
(Limit %)
sync-v2 (up to 20000 blocks)📈 view plot
🚷 view threshold
1.64 m
(-0.18%)Baseline: 1.64 m
1.48 m
(90.16%)
1.80 m
(90.74%)
🐰 View full continuous benchmarking report in Bencher

msbrogli
msbrogli previously approved these changes Jul 30, 2025
@jansegre jansegre force-pushed the tests/check-mutable-properties branch 2 times, most recently from 06120cd to a959cd8 Compare July 31, 2025 15:10
@codecov
Copy link

codecov bot commented Jul 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.65%. Comparing base (8849a23) to head (eb64e24).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1340      +/-   ##
==========================================
+ Coverage   85.59%   85.65%   +0.05%     
==========================================
  Files         424      424              
  Lines       32119    32119              
  Branches     4997     4997              
==========================================
+ Hits        27493    27512      +19     
+ Misses       3620     3606      -14     
+ Partials     1006     1001       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jansegre jansegre force-pushed the tests/check-mutable-properties branch 2 times, most recently from f243434 to aafc3c4 Compare July 31, 2025 19:18
msbrogli
msbrogli previously approved these changes Jul 31, 2025
@jansegre jansegre force-pushed the tests/check-mutable-properties branch from aafc3c4 to 1e44f67 Compare July 31, 2025 20:45
@glevco glevco moved this from In Progress (Done) to In Review (WIP) in Hathor Network Jul 31, 2025
@jansegre jansegre force-pushed the tests/check-mutable-properties branch 3 times, most recently from 4d0894b to cda71d0 Compare August 1, 2025 14:49
msbrogli
msbrogli previously approved these changes Aug 1, 2025
@glevco glevco moved this from In Review (WIP) to In Review (Done) in Hathor Network Aug 1, 2025
@jansegre jansegre merged commit b090d0c into master Aug 1, 2025
13 of 14 checks passed
@jansegre jansegre deleted the tests/check-mutable-properties branch August 1, 2025 23:24
@github-project-automation github-project-automation bot moved this from In Review (Done) to Waiting to be deployed in Hathor Network Aug 1, 2025
@glevco glevco restored the tests/check-mutable-properties branch August 4, 2025 16:26
@glevco glevco deleted the tests/check-mutable-properties branch August 4, 2025 16:44
@jansegre jansegre moved this from Waiting to be deployed to Done in Hathor Network Aug 5, 2025
This was referenced Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants