One function

_generate_launch_file in dbwls99706/ros2-engineering-skills

The author described this change as fix(scaffolder): import matches_action from launch.events (not launch_ros.events.lifecycle) - prior fix would ImportError at runtime; verified live in ROS 2 Jazzy. It counts as a record because the check below fails on the code as it stood at 91bc10241 and passes on a68299811, with nothing else changed between the two runs.

Fix saved2026-05-21
Sharing licenceApache-2.0 · LICENSE
Change size+2 1

What the code was meant to do, written into the code itself as a docstring

Generate a basic bringup.launch.py file for the package.

The change

77 from launch import LaunchDescription
88 from launch.actions import EmitEvent, RegisterEventHandler
99 from launch.substitutions import PathJoinSubstitution
10+from launch.events import matches_action
1011 from launch_ros.actions import LifecycleNode
1112 from launch_ros.event_handlers import OnStateTransition
12-from launch_ros.events.lifecycle import ChangeState, matches_action
13+from launch_ros.events.lifecycle import ChangeState
1314 from launch_ros.substitutions import FindPackageShare
1415 import lifecycle_msgs.msg
1516

The check that tells the two apart

failpass·tests/test_create_package.py::TestCppPackage::test_lifecycle_launch_uses_matches_action

Check file tests/test_create_package.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it91bc10241691925ef169cf7220c5db84b0b83304
Broken version dated2026-05-21
Modulescripts.create_package
Units changed_generate_launch_file
Fingerprint0e2071e3b365ccf8
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in dbwls99706/ros2-engineering-skills