Repository navigation
fix: report the failure stage and a real version in action telemetry - #9
Merged
Merged
Conversation
The telemetry layer replaced every action error with a fixed ACTION_EXECUTION_FAILED code, so the ingest could not tell where a run broke. main.mjs now stamps errors with the stage they came from (inputs, baseline, cli, check, comment) and the telemetry layer passes that stage to the SDK as errorStage, unknown when the error carries none.
GitHub runners leave GITHUB_ACTION_REF empty for composite actions, so every production run reported version local. resolveVersion now falls back to the package.json the runner checked out at GITHUB_ACTION_PATH, and the action carries its own version (1.3.0, the latest release tag; bump it at release time) so the fallback stays meaningful.
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Observability score · 64needs work across 3 packages · unchanged against
Note No Fix first (2)
evlog map v0.8.0 · how the score works · what each check expects |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two telemetry fixes so a red run in the dashboard actually says something.
Failures carry the stage where the action died. When the action's work throws, the error is now tagged with the stage it reached and
errorStageis set on the telemetry event before the fixedACTION_EXECUTION_FAILEDcode is reported. A failure in baseline checkout, in the CLI run, in the check run or in the comment step no longer all look identical. The original error is still what the caller sees (unchanged), so the CI log keeps showing the real message. The ingest allowlist needserrorStageon the server side: evloghq/evlog#786.The version is real.
GITHUB_ACTION_REFis empty for composite actions on real runners, so all 9 action runs this week reportedversion: "local".resolveVersion()now prefersGITHUB_ACTION_REF, falls back to theversionfield of the action's ownpackage.json(the runner checks the action out at the pinned ref intoGITHUB_ACTION_PATH), and only then sayslocal.package.jsonnow carries"version": "1.3.0", matching the latest tag; releases must keep bumping it or the fallback goes stale.Evidence
The failed run that prompted this (id 331131, 2026-10-06 09:46 UTC) recorded only:
{ "outcome": "error", "errorCode": "ACTION_EXECUTION_FAILED", "custom": { "baselineMode": "base", "packages": 1 } }With this change, the same failure records
errorStage(for example"baseline"ifgit fetchof the base died) and a version like"1.3.0"instead of"local". New tests cover both paths; full test run:npm run checkpasses.ELI5
The action reports every failure to a dashboard as just "something failed", and calls itself version "local" even in production. This makes it say which step broke (setup, scanning, or reporting) and which release it is, so the next failure can be diagnosed from the dashboard without access to the repo's own logs.