Skip to content

Read each module's atom table once in the cloak reachability test - #1008

Merged
mkreyman merged 1 commit into
masterfrom
fix/cloak-reachability-one-pass
Oct 19, 2026
Merged

mkreyman merged 1 commit into
masterfrom
fix/cloak-reachability-one-pass

Conversation

@mkreyman

Copy link
Copy Markdown
Owner

CloakAdvisoryReachabilityTest read every :loopctl module's atom table up to three times, once per affected cloak module, inside Enum.any?(@affected, ...). Each read made an Application.app_dir/2 call, which goes through the code server, plus a :beam_lib.chunks call.

On minis under load (20-34, with home_care_billing suites running at the same time), the chg S10 shadow run saw this test exceed ExUnit's 60 s timeout. It was waiting on :code_server.call (see mkreyman/home_care_billing#2544 for the same code-server stall).

The fix:

  • ebin is resolved once.
  • Each module's atom table is read once into a MapSet.
  • Offenders are the modules whose atom table intersects the affected set.

What the test asserts is unchanged: the GCM positive control still guards against a vacuous scan. Test-only; no operator-facing change.

The scan called Application.app_dir (a code-server round trip) and
:beam_lib.chunks for every module up to three times, once per affected
cloak module. Behind a loaded code server that stalled the test past
ExUnit's 60 s timeout (chg S10 shadow on minis, 2026-10-19). The ebin dir
is now resolved once and each atom table read once, intersected with the
affected set.
@mkreyman

Copy link
Copy Markdown
Owner Author

Review round 1 (code) counted at 7bc82cbeb62e via Skill lean-review. The review-round counter's merge gate reads this marker on any machine.

@mkreyman
mkreyman enabled auto-merge (squash) October 19, 2026 11:41
@mkreyman
mkreyman merged commit 55927a0 into master Oct 19, 2026
16 checks passed
@mkreyman
mkreyman deleted the fix/cloak-reachability-one-pass branch October 19, 2026 11:51
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