Skip to content

perf(scan): make production countSteps a bare add with test wrapper - #15

Merged
SMOSTAFAH1 merged 1 commit into
developfrom
perf/scan-steps-bare-add
Nov 22, 2026
Merged

SMOSTAFAH1 merged 1 commit into
developfrom
perf/scan-steps-bare-add

Conversation

@SMOSTAFAH1

Copy link
Copy Markdown
Member

Make countSteps in production a bare counter addition, relocating the validation checks into a wrapper installed by tests and benchmark harnesses.

Details:

  • Implement countSteps in markdown/scanSteps.ts as a bare in-place addition (counter[0] += n).
  • Provide installCheckingCountSteps / restoreProductionCountSteps and checkingCountSteps to enforce non-negative integer assertions in test and harness environments.
  • Automatically activate installCheckingCountSteps in bench/scanEntry.ts so zero-span and linearity guard suites continuously enforce bounds.
  • Update tests/scan-steps.test.cjs to verify both production bare addition behavior and checking wrapper validation.

Make countSteps in production a bare counter addition, relocating validation into a checking wrapper for tests and benchmark harnesses.
@sonarqubecloud

Copy link
Copy Markdown

@SMOSTAFAH1
SMOSTAFAH1 merged commit a9c731b into develop Nov 22, 2026
4 checks passed
@SMOSTAFAH1
SMOSTAFAH1 deleted the perf/scan-steps-bare-add branch November 22, 2026 01:29
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.

perf(scan-steps): make production countSteps a bare add, refuse only in tests/bench

1 participant