Skip to content

fix(formats): read a real UIL Region meet correctly - #97

Merged
JamesSingleton merged 1 commit into
mainfrom
fix/uil-region-meet-import
Nov 6, 2026
Merged

JamesSingleton merged 1 commit into
mainfrom
fix/uil-region-meet-import

Conversation

@JamesSingleton

Copy link
Copy Markdown
Owner

Description

This PR fixes importing and running a real Texas UIL Region meet. A tester sent the Meet Manager files for one, and replaying them showed event import and diving both failing.

Check on the real files Before After
Meet built from EV3, or EV3 + HYV 24 timed finals 22 prelims + 2 diving events with 11 dives each
Meet built from HYV alone Diving had 1 dive 11 dives
Dive rows skipped when merging entries 84 0
Entries from the results HY3 837 514, one per swim
"11 free" events 2 0
Phantom CL2 results About 70 0
HY3 + CL2 imported together 801 results 714, matching the file

Formats

  • EV3 now reads the round.
  • HYV no longer reads the board column as a dive count, and the exporter writes 1 there as Meet Manager does.
  • HY3 reads stroke F as diving with scores as points, and keeps one entry per swim when a results file repeats E1/F1 for each round.
  • CL2 reads 1H diving, treats ten-split lines as splits, and stops names at the end of the name column.
  • Merging matches HY3 preferred names to CL2 legal names.

Engine

  • Championship diving imports as one card of running totals, and building finals from a diving event is refused.
  • Divers match their event whatever distance a file gives it.
  • A field that exactly fits the circle-seeded heats now spreads evenly (18 swim 6/6/6, 20 swim 6/7/7), matching Meet Manager's heat sizes.

Admin

  • Results import skips diving points, so they can't become a best time. They aren't stored anywhere yet.

Important

A diver cut mid-meet still can't be scored, because the event expects all 11 dives. Diving cuts and advancer files are on the roadmap. Diving semifinal scores import labeled as a swim-off.

Behavior changes to review

  • HYV exports no longer carry a dive count, and a HYV-only import assumes 11 dives for prelim diving and 6 otherwise.
  • EV3 exports now write the real round instead of always F;1. The round count (2 for prelim/final, 3 for diving) is inferred from one file.
  • Even spreading applies only when the heats exactly match the circle count. Fields of two heats keep the old sizes, since the sample had none.

PR Type

  • 💡 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

🎟️ Related Tickets & Documents

None. The tester's account of the UIL postseason is summarized in the roadmap items this adds.

📸 Screenshots/Recordings

None. This changes parsing and meet logic, not the UI.

🛠️ Steps to QA

pnpm --filter @lane4hq/swim-formats test
pnpm --filter @lane4hq/meet-engine test
pnpm --filter @lane4hq/swim-core test

Then create a desktop meet from packages/swim-formats/fixtures/uil-region-events.ev3 and check that swims are prelims and diving has 11 dives. I haven't tried this in the running app, and the admin import action has no test of its own: only the skip rule does.

The new uil-region-* fixtures are events 9, 10, 15, and 17 of the real pack, with athletes, schools, ids, birth dates, and coaches replaced. Relay leg names don't match between the HY3 and CL2 fixtures.

📜 Added to documentation?

  • 📜 README.md
  • 🙅 Nope, no docs needed

The fixtures README and desktop roadmap are updated.

🤖 Generated with Claude Code

A Texas tester's Region pack showed import and diving failing on real
Meet Manager files.

- EV3: read the round, so prelims stop importing as timed finals.
- HYV: stop reading the board column as a dive count.
- HY3: read stroke F as diving with scores as points, and keep one entry
  per swim when results repeat E1/F1 for each round.
- CL2: read `1H` diving, stop treating ten-split lines as results, and
  stop names running into the member id.
- Merge: match HY3 preferred names to CL2 legal names, so the pair
  imports 714 results, not 801.
- Engine: import championship diving as one card, refuse finals from a
  diving event, match divers to events, and spread fields that fit the
  circle-seeded heats evenly (18 swim 6/6/6).
- Admin: skip diving points on results import so they can't become a
  best time.

Adds scrubbed UIL fixtures. Diving cuts between rounds are still to do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
lane4-hq-admin Error Error Nov 6, 2026 6:16pm UTC
lane4-hq-web Ready Ready Preview Nov 6, 2026 6:16pm UTC

Request Review

@JamesSingleton
JamesSingleton merged commit 6c135da into main Nov 6, 2026
7 of 8 checks passed
@JamesSingleton
JamesSingleton deleted the fix/uil-region-meet-import branch November 6, 2026 18:20

This branch had an error being deployed

1 failed and 1 active deployments
Preview – lane4-hq-web — ad997f4f Deployed Nov 6, 2026 by vercel[bot]
Preview – lane4-hq-admin — ad997f4f Deployed Nov 6, 2026 by vercel[bot]
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