Skip to content

Error trackers: count the template launcher as library code - #6

Merged
tevkert merged 1 commit into
mainfrom
fix/launcher-in-vendor
Nov 19, 2026
Merged

tevkert merged 1 commit into
mainfrom
fix/launcher-in-vendor

Conversation

@tevkert

@tevkert tevkert commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Fixes #5.

A forked worker's stack trace ends in the launcher it was forked from, not in artisan. The launcher was a copy in the private runtime directory, outside vendor/, so error trackers counted it as the app's own code:

  • Flare drops every frame above the first one it counts as the app's. For a job failing in vendor code (a package's job), only the launcher frame was left.
  • Sentry marked it in-app, and groups errors by in-app frames.
  • Nightwatch placed such exceptions at the launcher instead of where they were thrown.

Templates now start through a link in the runtime directory to the package's own bin/template.php. PHP resolves the link, so traces name the launcher in the app's vendor/, while the command line keeps the runtime path, with nothing in it horizon:purge could match. Links whose release is gone are removed; where no link can be made, the copy is used as before.

Tests: the workbench installs the package as a copy instead of the path repository's symlink, as an install from Packagist has, and a new fixture records what Flare, Sentry and Nightwatch make of a job failing in vendor code. Stock and prefork must match, under Horizon and queue:work. Without the fix it fails with exactly the reported trace; with it, all Docker suites pass locally (Horizon host mode, master spawns its template, queue:work), as do Unit and Mechanics.

A forked worker's stack trace ends in the launcher it was forked from, not in
artisan. The launcher was a copy in the private runtime dir, outside vendor/,
so error trackers counted it as the app's code: Flare dropped every frame above
it (only the launcher was left for a job failing in vendor code), Sentry marked
it in-app, and Nightwatch placed such exceptions there (#5).

Templates now start through a link in the runtime dir to the package's own
bin/template.php. PHP resolves the link, so traces name the launcher in the
app's vendor/, while the command line keeps the runtime path, with nothing in
it horizon:purge could match. Links whose release is gone are removed; where no
link can be made, the copy is used as before.

The workbench installs the package as a copy instead of the path repository's
symlink, as an install from Packagist has, and records what Flare, Sentry and
Nightwatch make of a job failing in vendor code; stock and prefork must match,
under Horizon and queue:work. The test fails without the fix.
@tevkert
tevkert merged commit 0805e96 into main Nov 19, 2026
62 checks passed
@tevkert
tevkert deleted the fix/launcher-in-vendor branch November 19, 2026 22:00
tevkert added a commit that referenced this pull request Nov 19, 2026
Templates start through a link to the package's own launcher, so error
trackers count it as library code and see a failed job's stack trace as in
stock (#5, #6). CHANGELOG for 1.1.2.
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.

Stacktrace not preserved

1 participant