• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

accordproject / concerto / 34147908513
98%

Build:
DEFAULT BRANCH: main
Ran 07 Sep 2026 05:32PM UTC
Jobs 3
Files 86
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Sep 2026 05:30PM UTC coverage: 97.744% (-0.03%) from 97.772%
34147908513

push

github

web-flow
fix(concerto-core): reset lastIndex before testing a stateful validator regex (#1310)

* fix(concerto-core): reset lastIndex before testing a stateful validator regex

A regex with the g or y flag is stateful: test() advances lastIndex, so the
same value alternates between matching and failing on consecutive calls. The
CTO grammar parses RegularExpressionFlags, so a model like

    o String code regex=/^[A-Z]{3}$/g

validated every other instance and rejected the ones in between, both in
StringValidator.validate and in Factory.newResource's identifier check.

StringValidator gains a matchesRegex(value) method that resets lastIndex
before testing, and both call sites use it.

Four regression tests added: repeated validation and repeated rejection with
a g flag, repeated validation with a y flag, and three consecutive
newResource calls with a g-flagged identifier regex.

Signed-off-by: rajanpanth <rajan.pantha@samriddhicollege.edu.np>

* fix(concerto-core): also reset lastIndex after testing, so getRegex stays clean

matchesRegex reset lastIndex before the test but left it dirty afterwards,
so a caller of the public getRegex() still received a poisoned object.
Reset in a finally block and assert it in a test.

Signed-off-by: rajanpanth <rajan.pantha@samriddhicollege.edu.np>

---------

Signed-off-by: rajanpanth <rajan.pantha@samriddhicollege.edu.np>

2225 of 2328 branches covered (95.58%)

Branch coverage included in aggregate %.

7 of 8 new or added lines in 2 files covered. (87.5%)

4100 of 4143 relevant lines covered (98.96%)

127815.88 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
98.56
-1.44% packages/concerto-core/src/introspect/stringvalidator.ts
Jobs
ID Job ID Ran Files Coverage
1 macos-latest - 34147908513.1 07 Sep 2026 05:32PM UTC 172
97.74
GitHub Action Run
2 windows-latest - 34147908513.2 07 Sep 2026 05:34PM UTC 172
97.74
GitHub Action Run
3 ubuntu-latest - 34147908513.3 07 Sep 2026 05:32PM UTC 172
97.74
GitHub Action Run
Source Files on build 34147908513
  • Tree
  • List 86
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #34147908513
  • 2d1e44c4 on github
  • Prev Build on main (#34145458079)
  • Next Build on main (#34152637947)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc