Skip to content

Filter ferrum 0.18's stack-frame lines out of the console log - #37

Merged
6temes merged 1 commit into
masterfrom
fix/ferrum-console-noise
Sep 15, 2026
Merged

6temes merged 1 commit into
masterfrom
fix/ferrum-console-noise

Conversation

@6temes

@6temes 6temes commented Sep 15, 2026

Copy link
Copy Markdown
Owner

ConsoleLogger filtered Ferrum's CDP protocol frames by prefix. ferrum 0.18 also
logs one at fn (url:line:col) line per stack frame of a console call, and those
went unfiltered to #warn.

That matters here because action_text_spec.rb:18 stubs warn with a matcher:

allow(ConsoleLogger).to receive(:warn).with(/ActionText assets should be loaded statically/)

A .with(matcher) stub rejects any other argument, and the stack-frame lines arrive
on Ferrum's own subscriber thread — so the resulting MockExpectationError is raised
there, killing the thread and failing every later js: true example.

The lockfile still pins cuprite 0.17 → ferrum 0.17.2, so the suite is green today.
Dependabot watches the root Gemfile, so the next cuprite minor would land this as a
cascading, unrelated-looking JS failure on a dependency PR. Cheaper before than after.

ConsoleLogger is a pure function, so it now has direct coverage — including a case
proving an ordinary message that merely mentions a stack frame is still forwarded,
so the filter cannot swallow real output.

Closes #33

ConsoleLogger filtered Ferrum's CDP frames by prefix. ferrum 0.18 also logs
one "    at fn (url:line:col)" line per stack frame of a console call, which
went unfiltered to #warn — and action_text_spec stubs `warn` with a matcher,
so the extra lines raise MockExpectationError on Ferrum's subscriber thread,
killing it and failing every later js example.

The lockfile still pins cuprite 0.17, so this lands before the bump rather
than as a cascading, unrelated-looking failure on a dependency PR.
@6temes
6temes marked this pull request as ready for review September 15, 2026 05:32
@6temes
6temes merged commit 5b1594e into master Sep 15, 2026
8 checks passed
@6temes
6temes deleted the fix/ferrum-console-noise branch September 15, 2026 05:32
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.

Filter ferrum 0.18's stack-frame console lines before they break the js suite

1 participant