Repository navigation
onboard-openneuro: report the real failure, not a stage roll-up - #115
Merged
Merged
Conversation
Half A of nemarOrg/nemar-cli#1309 (epic #1306). Deployed copy of nemar-cli's .github/dataset-workflows/onboard-openneuro.yml; the two files are byte-identical and a test in that repo keeps them joined to the classifier. Until now the only failure message reaching the database came from the `report` job: `terminal: prepare=failure copy=failure finalize=failure`, a stage roll-up with no error text. Every machine-filed tracking issue on this repo said exactly that, so there was nothing to classify and a human read run logs and applied labels by hand. The CLI-side classifier shipped in v0.10.2 reads text that was never being sent. Each phase job now reports its own failure with the CLI's failure line, in the failing job rather than in `report`: jobs do not share a filesystem, so `report` cannot read the tee'd log, and matrix job outputs overwrite each other across datasets. `copy` and `finalize` gain the tee `prepare` already had. The roll-up stays as the backstop and cannot clobber the specific message -- the backend refuses to overwrite a specific error with a generic one. Details that matter: - Reads the tee'd CLI output, never the Actions log: a bare `403` matches apt's "Packages [403 kB]" on every runner, and the upstream marker appears in every Actions log because the reporting step's own source is echoed, which is the likeliest origin of the misattributed upstream-403 labels on the open issues. - A six-line window from the last failure marker, because git prints what the classifier needs on continuation lines (`remote: error: GH013:`, `hint: ... diverging commits`). - `grep -nF` plus `sed`, not an awk bracket class: ubuntu-latest's awk is mawk and is byte-oriented, so a multibyte character in [...] matches stray bytes. - `jq -nc` builds every payload; the hand-rolled JSON it replaces only ever carried fixed strings, and an error line with a quote or backslash would have produced a silent 400 on the one callback carrying the diagnosis. - An empty extraction becomes a named fallback, never an empty error_message. Verified end to end before opening: the workflow's own extraction pipeline was run over logs in the shape the CLI writes, and each result fed to the real classifier. The expired PAT, the annex-uuid collision, the branch-protection ruleset and the git divergence -- the four causes behind the 2026-07/09 outage -- classify correctly; the fallback and the roll-up stay unknown/needs-triage.
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.
Summary
Half A of nemarOrg/nemar-cli#1309 (epic nemarOrg/nemar-cli#1306). This is the deployed copy of
nemar-cli's.github/dataset-workflows/onboard-openneuro.yml; the two files are byte-identical, andthe companion PR is nemarOrg/nemar-cli#1351.
The problem. The only failure message that reached the database came from the
reportjob:A stage roll-up with no error text. Every machine-filed tracking issue on this repo reads exactly that,
which is why a human has been reading run logs and applying
upstream-403/git-divergencelabels byhand. The classifier that shipped in nemar-cli v0.10.2 reads
import_jobs.last_error— text that wasnever being sent.
The change. Each phase job reports its own failure, carrying the CLI's failure line. It runs in the
failing job, not in
report, for two reasons that rule out the alternatives: jobs don't share afilesystem (so
reportcan't read the tee'd log), and matrix job outputs overwrite each other acrossdatasets (so a per-dataset error can't travel that way either).
copyandfinalizegain the tee thatpreparealready had.The roll-up stays as the backstop and cannot clobber the specific message — the backend refuses to
overwrite a specific error with a generic one, which is a rule that already exists for this purpose.
Details that are decisions, not incidentals
actively wrong, and both were hit while diagnosing the outage: a bare
403matches apt'sPackages [403 kB]on every runner, and[openneuro-upstream-inaccessible]appears in everyprepare log because the reporting step's own source is echoed by Actions. That second one is the
likeliest origin of the misattributed
upstream-403labels on the currently-open issues.ora().fail()interpolatessubprocess stderr, and git prints the part the classifier needs on continuation lines
(
remote: error: GH013:,hint: ... diverging commits). A single line would have dropped two of thefour real causes.
grep -nFplus asedwindow, not an awk bracket class.ubuntu-latest'sawkis mawk, whichis byte-oriented, so a multibyte character inside
[...]matches its individual bytes.jq -ncbuilds every payload. The hand-rolled JSON this replaces only ever carried fixedstrings, so it worked right up until the message stopped being fixed — and the failure mode is a
silent 400 on the one callback that carries the diagnosis.
error_message: the classifiertreats a roll-up or a null as
unknowndeliberately, and an empty string would look like a measured"no reason".
Test plan
Verified end to end before opening this, rather than after deploying it. The workflow's own extraction
pipeline was run over logs in the shape the CLI actually writes, and each result fed to the real
classifier:
Failed to clone: fatal: Authentication failed for …auth_invalidFailed to enable s3-PUBLIC remote: … annex-uuid file indicates it is used by a different special remoteannex_uuid_conflictFailed to push: remote: error: GH013: Repository rule violations found …branch_protectionFailed to push: hint: … diverging commitsgit_divergenceprepare failed with no CLI failure line captured (see run log)unknown→needs-triageterminal: prepare=failure copy=failure finalize=failureunknown→needs-triageThose first four are the causes behind the 2026-07-22 → 2026-09-08 outage, so this is the taxonomy
being re-derived from the messages the workflow will now send.
Also verified: the file parses as YAML, all three reporters are present and name their own stage, and
nemarOrg/nemar-cli#1351 adds a test that fails if any of the tee, the per-stage reporter, the jq
payload, or the read-the-log-not-the-Actions-log rule is edited away — checked by removing a tee and a
jqand watching it fail.Deploy note
The CLI-side classifier is already on
devand released, so this can land as soon as it is reviewed;capture and classify are independent. Nothing here changes the success path — every new step is
if: failure().