Skip to content

car_diff: dedupe errors and render in dropdown#479

Closed
elkoled wants to merge 6 commits into
car-diff-test-basefrom
car-diff-dedup
Closed

car_diff: dedupe errors and render in dropdown#479
elkoled wants to merge 6 commits into
car-diff-test-basefrom
car-diff-dedup

Conversation

@elkoled
Copy link
Copy Markdown
Owner

@elkoled elkoled commented May 29, 2026

Test of car_diff hardening on the fork. This branch keeps the buggy nissan PR (commaai#3409) carstate so the replay still errors on the 4 non-Altima platforms, exercising the new error path.

Expected: instead of ~40 identical tracebacks printed at the top, the report shows a single collapsible 'Show errors' dropdown with the traceback deduped and tagged (40x).

🤖 Generated with Claude Code

@elkoled elkoled changed the base branch from master to car-diff-test-base May 29, 2026 04:11
A single failing carcontroller raised the same traceback for every
segment, printing dozens of identical tracebacks at the top of the
report. Group errors by their text, print each unique one once with the
affected segment count, and wrap the whole block in a details dropdown
like the diff section so it does not spam the PR comment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

Car behavior report

Replays driving segments through this PR and compares the behavior to master.
Please review any changes carefully to ensure they are expected.

Testing 50 segments for: NISSAN_XTRAIL, NISSAN_LEAF, NISSAN_LEAF_IC, NISSAN_ROGUE, NISSAN_ALTIMA

⚠️ 10 changed, 0 passed, 40 errors

Show errors

ERROR (40x) NISSAN_XTRAIL - fa9224be239005c7/00000025--f01ff2746c/10, NISSAN_XTRAIL - fa9224be239005c7/00000064--ab03283e5a/1, NISSAN_XTRAIL - fa9224be239005c7/00000027--ca392de157/70 (+37 more):
Traceback (most recent call last):
  File "/home/runner/work/opendbc/opendbc/opendbc/car/tests/car_diff.py", line 87, in process_segment
    CP, states, timestamps = replay_segment(platform, can_msgs)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/opendbc/opendbc/opendbc/car/tests/car_diff.py", line 78, in replay_segment
    CI.apply(CC, msg.logMonoTime)
  File "/home/runner/work/opendbc/opendbc/opendbc/car/interfaces.py", line 116, in apply
    return self.CC.update(c, self.CS, now_nanos)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/opendbc/opendbc/opendbc/car/nissan/carcontroller.py", line 62, in update
    can_sends.append(nissancan.create_steer_torque_sensor(self.packer, steer_torque_sensor_msg, CC.latActive, CC.forceDecel))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/opendbc/opendbc/opendbc/car/nissan/nissancan.py", line 43, in create_steer_torque_sensor
    values = {s: steer_torque_sensor_msg[s] for s in [
                 ~~~~~~~~~~~~~~~~~~~~~~~^^^
TypeError: string indices must be integers, not 'str'
Show changes

NISSAN_ALTIMA - 6806e3afd093b01e/00000121--6b7b117f22/3

  invalidLkasSetting (6000 diffs)

  frames 0-5999
  master:   ____________________________________________________________________...
  PR:       ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾...

NISSAN_ALTIMA - 6806e3afd093b01e/00000103--1e973f52ab/61

  invalidLkasSetting (6000 diffs)

  frames 0-5999
  master:   ____________________________________________________________________...
  PR:       ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾...

NISSAN_ALTIMA - 50aa739c8332289a/00000091--3be422c237/6

  invalidLkasSetting (6000 diffs)

  frames 0-5999
  master:   ____________________________________________________________________...
  PR:       ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾...

NISSAN_ALTIMA - 50aa739c8332289a/000000a4--f091618f6f/7

  invalidLkasSetting (6000 diffs)

  frames 0-5999
  master:   ____________________________________________________________________...
  PR:       ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾...

NISSAN_ALTIMA - bb9aae77e71e7d12/00000011--71636b597a/2

  invalidLkasSetting (6000 diffs)

  frames 0-5999
  master:   ____________________________________________________________________...
  PR:       ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾...

NISSAN_ALTIMA - 50aa739c8332289a/000000a2--517790ed38/10

  invalidLkasSetting (6000 diffs)

  frames 0-5999
  master:   ____________________________________________________________________...
  PR:       ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾...

NISSAN_ALTIMA - 6806e3afd093b01e/000000d4--185c366b28/8

  invalidLkasSetting (6002 diffs)

  frames 0-6001
  master:   ____________________________________________________________________...
  PR:       ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾...

NISSAN_ALTIMA - 6806e3afd093b01e/00000000--6b24ef4dc7/1

  invalidLkasSetting (6001 diffs)

  frames 0-6000
  master:   ____________________________________________________________________...
  PR:       ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾...

NISSAN_ALTIMA - 0b597dee96f7f282/000000b2--af0d30f125/58

  invalidLkasSetting (6000 diffs)

  frames 0-5999
  master:   ____________________________________________________________________...
  PR:       ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾...

NISSAN_ALTIMA - 50aa739c8332289a/000000a3--88706d7f5c/13

  invalidLkasSetting (5999 diffs)

  frames 0-5998
  master:   ____________________________________________________________________...
  PR:       ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾...

@elkoled
Copy link
Copy Markdown
Owner Author

elkoled commented May 29, 2026

Superseded by #480 (minimal, on latest master).

@elkoled elkoled closed this May 29, 2026
@elkoled elkoled deleted the car-diff-dedup branch May 29, 2026 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants