Faster CI and repo-map: findings from the TutorialVideos room #10

Open
claudeBot wants to merge 1 commit from tutorialvideos-findings into main
Collaborator

The TutorialVideos room installed repo-map and the faster CI changes (TutorialVideos PR #26, merged) and sent back 5 findings. 4 are about the CI guide and 1 about repo-map.sh. Its CI went from about 8 minutes for a PR to go green to 20 seconds, and the main deploy from 5m 04s to 1m 08s.

Changes to ci/faster-ci.md

  1. Fix 3: run each commit once. A workflow with push on every branch and pull_request runs every PR commit twice, and the 2 runs slow each other down on the one runner. This was about half of TutorialVideos' wait. The guide now says to keep push for main only.
  2. ubuntu-latest already has docker. The guide said only that node:22-bookworm lacks it, so a room on ubuntu-latest would still download and check a docker binary it did not need. It now says which 4 lines to leave out.
  3. A PHP version matrix can share one image. Install every version from packages.sury.org and pick one per job with update-alternatives. Otherwise a room might build one image per version.
  4. Faster CI shows up flaky tests. TutorialVideos found 3 (its PR #29). Because job logs cannot be read through the API, the guide suggests looping the suite locally until it fails.
  5. TutorialVideos' results are added. The memory disk did not apply there, as its tests already use SQLite in memory.

Changes to repo-map.sh

  1. Title. It printed the folder name, which in a worktree is usually the branch. It now prints the repository name, from Git's common directory, plus the path inside the repository when mapping a subdirectory. Outside Git it still uses the folder name.
  2. Group prefixes in the static route scan. When artisan cannot boot, the scan listed Route::get('/videos') with no sign it sat inside Route::prefix('admin') or ['prefix' => 'api/v1'], so a session would look for the wrong URL. The scan is now a small awk script that tracks groups by brace depth and prints each route's prefix, for example routes/api.php:7 [v1/admin] Route::post('/videos', ...). Braces inside strings, such as {user} route parameters, and after // are ignored, and a prefix on a single route applies to that route only. Lines with no prefix print as before.

Checks

  • node --test: 4 tests pass. The new test fails on the old script.
  • The new test covers a worktree title and the 3 prefix forms: prefix() on the same line, prefix() in a chain over several lines, and ['prefix' => ...]. It also checks that a } inside a string does not close a group.
  • The same fixture gives identical output under gawk and mawk, since rooms may have either.

Recorded on omp-matrix-bot#27.

The TutorialVideos room installed repo-map and the faster CI changes (TutorialVideos PR #26, merged) and sent back 5 findings. 4 are about the CI guide and 1 about `repo-map.sh`. Its CI went from about 8 minutes for a PR to go green to 20 seconds, and the main deploy from 5m 04s to 1m 08s. ## Changes to `ci/faster-ci.md` 1. **Fix 3: run each commit once.** A workflow with `push` on every branch and `pull_request` runs every PR commit twice, and the 2 runs slow each other down on the one runner. This was about half of TutorialVideos' wait. The guide now says to keep `push` for main only. 2. **`ubuntu-latest` already has `docker`.** The guide said only that node:22-bookworm lacks it, so a room on `ubuntu-latest` would still download and check a docker binary it did not need. It now says which 4 lines to leave out. 3. **A PHP version matrix can share one image.** Install every version from packages.sury.org and pick one per job with `update-alternatives`. Otherwise a room might build one image per version. 4. **Faster CI shows up flaky tests.** TutorialVideos found 3 (its PR #29). Because job logs cannot be read through the API, the guide suggests looping the suite locally until it fails. 5. TutorialVideos' results are added. The memory disk did not apply there, as its tests already use SQLite in memory. ## Changes to `repo-map.sh` 1. **Title.** It printed the folder name, which in a worktree is usually the branch. It now prints the repository name, from Git's common directory, plus the path inside the repository when mapping a subdirectory. Outside Git it still uses the folder name. 2. **Group prefixes in the static route scan.** When artisan cannot boot, the scan listed `Route::get('/videos')` with no sign it sat inside `Route::prefix('admin')` or `['prefix' => 'api/v1']`, so a session would look for the wrong URL. The scan is now a small awk script that tracks groups by brace depth and prints each route's prefix, for example `routes/api.php:7 [v1/admin] Route::post('/videos', ...)`. Braces inside strings, such as `{user}` route parameters, and after `//` are ignored, and a prefix on a single route applies to that route only. Lines with no prefix print as before. ## Checks - `node --test`: 4 tests pass. The new test fails on the old script. - The new test covers a worktree title and the 3 prefix forms: `prefix()` on the same line, `prefix()` in a chain over several lines, and `['prefix' => ...]`. It also checks that a `}` inside a string does not close a group. - The same fixture gives identical output under gawk and mawk, since rooms may have either. Recorded on omp-matrix-bot#27.
The faster CI guide gains Fix 3 (run each commit once), the docker command
on ubuntu-latest, one image for a PHP version matrix, a note on flaky tests,
and TutorialVideos' results. repo-map.sh titles a worktree with the
repository name and keeps group prefixes in the static Laravel route scan.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin tutorialvideos-findings:tutorialvideos-findings
git switch tutorialvideos-findings

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff tutorialvideos-findings
git switch tutorialvideos-findings
git rebase main
git switch main
git merge --ff-only tutorialvideos-findings
git switch tutorialvideos-findings
git rebase main
git switch main
git merge --no-ff tutorialvideos-findings
git switch main
git merge --squash tutorialvideos-findings
git switch main
git merge --ff-only tutorialvideos-findings
git switch main
git merge tutorialvideos-findings
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
James/omp-templates!10
No description provided.