Skip to content

review: the assertion macros do not count as stage logic (VX_ASSERT, __assert) - #567

Merged
tinebp merged 1 commit into
masterfrom
docs/policy-vx-assert
Dec 3, 2026
Merged

tinebp merged 1 commit into
masterfrom
docs/policy-vx-assert

Conversation

@tinebp

@tinebp tinebp commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

The pipeline-stage detector (policy v4) and the SimX/RTL lockstep check ignore
assertion macros so that a pure assertion edit in a shared stage is not read as
logic. They listed assert but not the project's own VX_ASSERT (or the old
__assert), so the __assert → VX_ASSERT rename in #560 (F10) was classified
R3 pipeline-stage and raised a lockstep warning. Reported as P3 in the #560
review.

  • docs/review/change-impact.yaml: VX_ASSERT and __assert join
    c_ignore_macros (pipeline-stage) and simx_ignore_macros (lockstep);
    policy_version 5 → 6.
  • ci/test_change_impact.py: a rename case. It fails on v5 and passes on v6.

Checks

  • python3 ci/change_impact.py lint-policy: OK, policy v6.
  • python3 -m pytest ci/test_change_impact.py: 141 passed, 1 skipped (the replay-against-origin case, which needs an origin remote).
  • change_impact.py replay --max-count 300: R0 28, R1 34, R2 155, R3 83, identical to v5. No commit in that window renames an assertion in a stage file.
  • Bug fixes to master found while integrating the Vulkan graphics stack #560's F10 goes from R3 to R2.

🤖 Generated with Claude Code

@tinebp
tinebp force-pushed the docs/policy-vx-assert branch from cc15c51 to 8a79c6a Compare December 2, 2026 13:47
…__assert)

The pipeline-stage detector and the SimX/RTL lockstep check drop the
assertion and trace macros before they compare a SimX file, but their C list
named only `assert`. The project's own assertion macro, `__assert`
(sw/common/util.h), and its replacement name, `VX_ASSERT`, were counted as
logic. A pure rename of an assertion in a SimX pipeline model was therefore
classified R3 (pipeline-stage), with a lockstep warning, although nothing that
is built or timed changes.

- change-impact.yaml: `VX_ASSERT` and `__assert` join `c_ignore_macros`
  (pipeline-stage) and `simx_ignore_macros` (simx-rtl-lockstep), next to
  `assert`. `policy_version` 6 -> 7.
- test_change_impact.py: a rename of `__assert` to `VX_ASSERT` in
  sim/simx/scheduler.cpp raises neither pipeline-stage nor the lockstep
  warning. It fails on the v6 policy and passes on v7.

Checks:
- `python3 ci/change_impact.py lint-policy`: OK, policy v7, 9 path rules,
  16 detectors, 5 evidence checks.
- `python3 -m pytest ci/test_change_impact.py`: 144 passed.
- `change_impact.py replay --range origin/master --max-count 300`: R0 28
  (9.3%), R1 34 (11.3%), R2 155 (51.7%), R3 83 (27.7%). This is identical to
  v6: no commit in that window renames an assertion in a stage file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tinebp
tinebp force-pushed the docs/policy-vx-assert branch from 8a79c6a to 60cbe3e Compare December 3, 2026 10:09
@tinebp
tinebp merged commit b654e42 into master Dec 3, 2026
1 of 8 checks passed
@tinebp
tinebp deleted the docs/policy-vx-assert branch December 3, 2026 10:09
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