Skip to content

fix: move-in/out algorithm standardization & property testing#4003

Open
icehaunter wants to merge 4 commits intomainfrom
ilia/pr/pqwsutmtqwuu
Open

fix: move-in/out algorithm standardization & property testing#4003
icehaunter wants to merge 4 commits intomainfrom
ilia/pr/pqwsutmtqwuu

Conversation

@icehaunter
Copy link
Contributor

  • Adds algorithm description as an MD file
  • Rewrites the implementation as a decision that follows from a fixed information set
  • Aligns internal representation of the move information with the algorithm (old touch_tracker vs new shadow + delegates
  • Adds more isolated property tests than oracle tests, along with the new consumer test category, that allows easy emulation of event timing
  • Consumer subscribes to a global LSN fanout (only if it has dependencies, i.e. can have a move-in at all) to be able to append the move-in at at a correct point in the replication stream

@codecov
Copy link

codecov bot commented Mar 12, 2026

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2636 1 2635 4
View the top 1 failed test(s) by shortest run time
Elixir.Electric.Shapes.ConsumerPropertyTest::property consumer produces a valid materializable log for arbitrary event sequences
Stack Traces | 1.88s run time
1) property consumer produces a valid materializable log for arbitrary event sequences (Electric.Shapes.ConsumerPropertyTest)
     .../electric/shapes/consumer_property_test.exs:59
     ** (exit) exited in: GenServer.call({:via, Registry, {:"Electric.ProcessRegistry:Electric.Shapes.ConsumerPropertyTest property consumer produces a valid materializable log for arbitrary event sequences", {Electric.Replication.ShapeLogCollector.RequestBatcher, nil}}}, {:remove_shape, "27714432-1773340922928736"}, 5000)
         ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
     code: check all(
     stacktrace:
       (elixir 1.19.5) lib/gen_server.ex:1135: GenServer.call/3
       (electric 1.4.13) .../electric/shape_cache/shape_cleaner.ex:147: anonymous fn/3 in Electric.ShapeCache.ShapeCleaner."REPATCH-remove_shapes_immediate"/3
       (elixir 1.19.5) lib/enum.ex:4497: Enum.flat_map_list/2
       (opentelemetry 1.7.0) .../opentelemetry/src/otel_tracer_default.erl:47: :otel_tracer_default.with_span/5
       (electric 1.4.13) .../electric/telemetry/open_telemetry.ex:87: anonymous fn/5 in Electric.Telemetry.OpenTelemetry.do_with_span/5
       (telemetry 1.3.0) .../telemetry/src/telemetry.erl:324: :telemetry.span/3
       (electric 1.4.13) .../electric/shape_cache/shape_cleaner.ex:32: anonymous fn/3 in Electric.ShapeCache.ShapeCleaner."REPATCH-remove_shapes"/3
       (opentelemetry 1.7.0) .../opentelemetry/src/otel_tracer_default.erl:47: :otel_tracer_default.with_span/5
       (electric 1.4.13) .../electric/telemetry/open_telemetry.ex:87: anonymous fn/5 in Electric.Telemetry.OpenTelemetry.do_with_span/5
       (telemetry 1.3.0) .../telemetry/src/telemetry.erl:324: :telemetry.span/3
       (electric 1.4.13) .../support/consumer_property/runner.ex:570: Support.ConsumerProperty.Runner.cleanup_shape/4
       (electric 1.4.13) .../support/consumer_property/runner.ex:288: Support.ConsumerProperty.Runner."-run_scenario/2-after$^7/0-1-"/5
       (electric 1.4.13) .../support/consumer_property/runner.ex:169: Support.ConsumerProperty.Runner.run_scenario/2
       .../electric/shapes/consumer_property_test.exs:73: anonymous fn/3 in Electric.Shapes.ConsumerPropertyTest."property consumer produces a valid materializable log for arbitrary event sequences"/1
       (stream_data 1.3.0) lib/stream_data.ex:2510: StreamData.check_all/7
       .../electric/shapes/consumer_property_test.exs:60: (test)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@blacksmith-sh
Copy link
Contributor

blacksmith-sh bot commented Mar 12, 2026

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
Elixir.Electric.Shapes.ConsumerPropertyTest/
property consumer produces a valid materializable log for arbitrary event sequences
View Logs

Fix in Cursor

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