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

bleedingdeacons / tsml-for-unity / 35582029144
94%

Build:
DEFAULT BRANCH: main
Ran 21 Sep 2026 09:15AM UTC
Jobs 1
Files 61
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

21 Sep 2026 09:13AM UTC coverage: 93.889%. Remained the same
35582029144

push

github

web-flow
fix: publish GROUP_POST_TYPE so Amber's group-name search can match (#81)

Found while verifying Amber's meeting-list search on the test bed after the
PHP 8.4/8.5 upgrade. **Pre-existing bug, unrelated to that work.**

## The problem

`Plugin::registerServices()` publishes the Meeting config as
`ReflectionClass::getConstants()` of `TsmlMeetingFields`. Amber's
`MeetingAdmin::searchJoin()` reads `GROUP_POST_TYPE` out of that config to join
the group post and search its title — and the key was never published.

A missing key isn't fatal, which is why it survived: it's an undefined array key
that lands in SQL as an empty string.

```sql
LEFT JOIN wp_posts AS group_post
  ON (group_meta.meta_value = group_post.ID AND group_post.post_type = '')
```

No row can satisfy that, so the group half of the search matched nothing.

## Measured on the test bed

Isolating just the group-join branch of the search:

```
as shipped (post_type = '')  -> 0 meetings
with 'tsml_group'            -> 1 meeting
```

## Why nobody noticed

Every meeting is titled after its group, so `wp_posts.post_title LIKE` matched
first and the results looked correct. I searched for a group whose name appears
in no meeting title and there isn't one on that dataset — the bug was masked by
the data, not absent.

## The fix

`GROUP_POST_TYPE = TsmlGroupFields::POST_TYPE`, referencing the canonical value
rather than repeating the literal so the two can't drift.

Note `TsmlGroupFields` carries a commented-out `GROUP_POST_TYPE = 'home-group'`.
That is a different thing and would not have worked either — the meetings point
at `tsml_group` posts.

## Tests

New `TsmlMeetingFieldsTest` pins both the value and the *presence* of every key
consumers read, since the failure mode is a missing key rather than a wrong one
and produces no error.

Full gate sequence green: validate, PHPStan level 8, PHPUnit, PHPCS,
build:production.

## Still worth doing separately

Amber reads this key without a fallback, so ... (continued)

3457 of 3682 relevant lines covered (93.89%)

6.55 hits per line

Coverage Regressions

Lines Coverage ∆ File
4
0.0
0.0% tsml-for-unity/tsml-for-unity/src/Meetings/TsmlMeetingFields.php
Jobs
ID Job ID Ran Files Coverage
1 35582029144.1 21 Sep 2026 09:15AM UTC 61
93.89
GitHub Action Run
Source Files on build 35582029144
  • Tree
  • List 61
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #35582029144
  • b9a34ba2 on github
  • Prev Build on main (#35543134016)
  • Next Build on main (#35944673468)
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