Repository navigation
Phase 7w: compare the deployed re-pull workflow in CI (held) - #1980
Merged
neuromechanist merged 6 commits intoOct 27, 2026
Conversation
Adds run-upstream-repull.yml to the sparse checkout of the deployed dataset workflows and updates the comment's count to four. Nothing reads the file yet; the next commit names it for the parity test. YAML parsed; not run in CI.
Names the checked-out copy in NEMAR_REPULL_WORKFLOW_LIVE so test/repull-workflow.test.ts compares it byte for byte; a declared path that is missing fails. The unit-pure job stays red until the twin pull request lands in nemarDatasets/.github, so this is held with it. YAML parsed; not run in CI.
3 of 4 tasks
Comment only. The header said the unit-pure-shard job will, once the deploy lands, name the deployed copy. It now says the job does so, stays red until the deploy pull request is merged, and fails on any drift after. bun test test/repull-workflow.test.ts: 34 pass, 3 skip, 0 fail with the variable unset.
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR1980Version: 🤖 Updated on each push. |
The validation step now checks the token and repull_id in the jq gate, on the event file, where a token with a trailing newline and an empty repull_id can no longer pass as they did through a shell variable. The mask step splits the token at carriage returns as well as line feeds. Comment fixes: the second step reads the token, canceled, and the script, not the runner header, never echoes a value. Checked with a hostile-event harness (each guard mutated and caught), actionlint, and test/repull-workflow.test.ts: 34 pass, 3 skip. The org copy follows in nemarDatasets/.github#148.
neuromechanist
added a commit
to nemarDatasets/.github
that referenced
this pull request
Oct 27, 2026
Whole-file copy of the hardened .github/dataset-workflows/run-upstream-repull.yml from nemarOrg/nemar-cli#1980, commit db1b932040f08bfbc045768b3de87897519291ac (sha256 ea9052fe68bc2be207425740515711aa5b3d6df4cbee308c9c0d14f05fc479ea, 343 lines). Verified with cmp. The token and repull_id are checked in the jq gate on the event file, and the mask step splits at carriage returns too. actionlint clean; the workflow was not executed.
The validation gate now refuses a control character in any payload field, read from the event file. An environment variable ends at a NUL, so the checks on the variables saw only what preceded it and step 2 passed a payload the CLI refused later. The test also covers the final newline that a regex dollar lets through, so the separate final-newline guard on the token and repull_id is gone. Checked with the review harness on jq 1.8.2, Apple jq 1.7.1 and Ubuntu 24.04's jq 1.7.1 (identical results), actionlint clean, and the existing tests: 34 pass, 3 skip. The org copy follows in nemarDatasets/.github#148.
Adds cases to the mask test and the refusal test, each caught by its own mutant: a carriage return in the token is masked per line; a token with a final newline, an empty repull_id and a repull_id of 1 plus a newline are refused; a NUL in any field is refused, with the job environment cut at the NUL as a C string is. The refusal cases are collected, so a weakened check shows every case it lets through. 34 pass, 3 skip (37 pass against the org copy).
neuromechanist
added a commit
to nemarDatasets/.github
that referenced
this pull request
Oct 27, 2026
Whole-file copy of .github/dataset-workflows/run-upstream-repull.yml from nemarOrg/nemar-cli#1980, commit a3dc47cea58d6d1b7dd2f7a4924355737eaa216a (sha256 ccb8a657ac61bd43dbc3105efede0c5101bc34e484b76471e91d75cd8a66c259, 345 lines). The validation gate refuses a control character in any payload field, which closes the gap where a NUL ended an environment variable and step 2 passed a payload the CLI refused later. Verified with cmp. actionlint and shellcheck clean; the workflow was not executed.
neuromechanist
added a commit
to nemarDatasets/.github
that referenced
this pull request
Oct 27, 2026
* Add the upstream re-pull workflow Whole-file copy of .github/dataset-workflows/run-upstream-repull.yml from nemarOrg/nemar-cli, branch feature/issue-1046-epic-upstream-freshness at 1abf92868e8216b4d1596d6802dea0c7ab2f7e8c (file last changed in 138386fb650568c56d7abf6dbed34ecf88f917fe; sha256 7335f4cd99b1e1cf6718ab044efe23c0a6856df8968df85804ef176ede81f74b, 336 lines). Verified with cmp. YAML parsed and actionlint clean; the workflow was not executed. * ci: harden the repull token and mask checks Whole-file copy of the hardened .github/dataset-workflows/run-upstream-repull.yml from nemarOrg/nemar-cli#1980, commit db1b932040f08bfbc045768b3de87897519291ac (sha256 ea9052fe68bc2be207425740515711aa5b3d6df4cbee308c9c0d14f05fc479ea, 343 lines). Verified with cmp. The token and repull_id are checked in the jq gate on the event file, and the mask step splits at carriage returns too. actionlint clean; the workflow was not executed. * ci: refuse control characters in the payload Whole-file copy of .github/dataset-workflows/run-upstream-repull.yml from nemarOrg/nemar-cli#1980, commit a3dc47cea58d6d1b7dd2f7a4924355737eaa216a (sha256 ccb8a657ac61bd43dbc3105efede0c5101bc34e484b76471e91d75cd8a66c259, 345 lines). The validation gate refuses a control character in any payload field, which closes the gap where a NUL ended an environment variable and step 2 passed a payload the CLI refused later. Verified with cmp. actionlint and shellcheck clean; the workflow was not executed.
neuromechanist
marked this pull request as ready for review
October 27, 2026 09:01
neuromechanist
merged commit Oct 27, 2026
9f7a645
into
feature/issue-1046-epic-upstream-freshness
44 of 46 checks passed
This branch was previously deployed
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
Phase 7w of epic #1046, part of #1913. It changes
.github/workflows/test.yml,test/repull-workflow.test.ts(a header comment and new cases) and the workflow's authoring copy.github/dataset-workflows/run-upstream-repull.yml(review fixes, below). Theunit-pure-shardjob's sparse checkout ofnemarDatasets/.github(main) gains.github/workflows/run-upstream-repull.yml, and the test step names the checked-out copy inNEMAR_REPULL_WORKFLOW_LIVE, sotest/repull-workflow.test.tscompares the deployed workflow byte for byte with the authoring copy at.github/dataset-workflows/run-upstream-repull.yml. This is the arrangement the onboard, PR review and publication review workflows already have (the last two arrived in #1724 and #1790). With the variable set, a declared path that is missing fails, so a broken checkout cannot quietly turn the check off.Six commits, one change each:
ci: check out the repull workflow in testsadds the checkout line and updates the comment's count to four files,ci: set the repull workflow live flag in testsadds the variable,test: say repull header names the deployed copyrewords a header comment,ci: harden the repull token and mask checkshardens the authoring copy,ci: refuse control characters in the payloadcloses the control-character gap in it, andtest: pin the repull hardening and control checkpins both. On the epic head1abf9286the sparse-checkout block is at lines 971 to 975 and the three existing variables at lines 1033 to 1035; the new lines land at 976 and 1038.Hold
Do not merge yet. This is the nemar-cli half of a held pair; the twin is nemarDatasets/.github#148, which adds the byte-identical workflow file to
nemarDatasets/.github. Until that file is on themainofnemarDatasets/.github, the Tests run on this PR fails by design inunit-pure-shard, intest/repull-workflow.test.ts, with "NEMAR_REPULL_WORKFLOW_LIVE=... but that file does not exist". It is opened as a draft for that reason.Merge only after the owner's explicit confirmation, in this order: first the twin, which adds an inert file (it runs only on a
repository_dispatchof typerun-upstream-repull, and the Worker sends none until the owner turns the switches on after the release); then re-run the Tests workflow on this PR and expectunit-pure-shardgreen; then merge this PR into the epic branch; then the epic branch todevand the release. Merging this PR first would turn the epic branch's Tests run red until the twin lands, and the epic-to-dev run is the gate.The twin carries the authoring copy as of
a3dc47c. If the copy changes again, here or on the epic branch, before the twin merges, the twin must be refreshed from the new commit; its body gives thecmpcommand.Test plan
bun run typecheck: exit 0.bun run lint: exit 0 (Biome checkssrc/; this change is YAML only).bun test test/repull-workflow.test.tswith no variable set: exit 0, 34 pass, 3 skip (the parity block skips visibly), 0 fail.NEMAR_REPULL_WORKFLOW_LIVEset to the twin branch's file: exit 0, 37 pass, 0 skip, 0 fail..github/workflows/test.ymland of the twin's new workflow with theyamlpackage 2.8.4 under Bun: both parse, exit 0.test.yml, the list holds four anchored lines with the new one exactly once, and the fourNEMAR_*_WORKFLOW_LIVEvalues match the four lines. The checker failed on the unchanged file, on a one-letter typo and on a wrong directory. A real non-conegit sparse-checkoutof the twin branch with those four lines materializes exactly four files, and the new one is byte-identical to the authoring copy.actionlint1.7.12: the same three SC2086 notes intest.ymlbefore and after, none new.e696ad07(run 40463699265), read while it was still running:changes,lint,zarr-python-test,patch-duration-testand unit-pure shards 1 to 5 pass. The realactions/checkoutaccepted the new sparse line and the test step received the variable. Shard 6 fails only the three deployed-copy tests oftest/repull-workflow.test.ts(2027 pass, 18 skip, 3 fail) with "that file does not exist; the checkout step did not produce it", which is the held state described above. Nothing else fails.nemarDatasets/.githubmainproducing the file, andunit-puregreen on this head.Review fix (the review had no blocking finding and one suggestion, accepted): the header of
test/repull-workflow.test.tssaid theunit-pure-shardjob "will, once the deploy lands" name the deployed copy. The third commit rewords it, as a comment only, to say what is true now (the job checks the copy out ofnemarDatasets/.githubmainand names it inNEMAR_REPULL_WORKFLOW_LIVE, and stays red until the twin is merged) and what is true after (any difference between the two copies fails it). The test file gives the same counts as before: 34 pass, 3 skip, 0 fail with the variable unset.Review fix 2 (accepted from the review of the twin, nemarDatasets/.github#148):
ci: harden the repull token and mask checkschanges the authoring copy, and the twin carried the same bytes then (db1b932). The validation step now checksdispatch_tokenandrepull_idinside itsjq -egate, on the event file. A token of 64 hex characters followed by a newline used to pass, because$(jq -r)strips the newline before the shell sees it, and an emptyrepull_idpassed as if the key were absent; both are refused now. The mask step splits the token at carriage returns as well as line feeds before it masks each line, so a lone carriage return no longer keeps two parts of a value inside one::add-mask::line. Comments only: the second step is named as a token reader, "cancelled" is "canceled", and the validation script's comment says the script never echoes a value without claiming the runner's step header, which prints the job'senv:, is clean. Not applied: theDeploy to:path form on line 3, becausetest/repull-workflow.test.tspins the short form and changing it would churn the pin and both copies for a cosmetic difference. Checked with the review's hostile-event harness (the old file accepts the two holes and masks a lone carriage return inside one line; the new file refuses them and splits; no other case changed, and each guard, mutated alone, is caught),actionlint(no findings), andbun test test/repull-workflow.test.ts(34 pass, 3 skip with the variable unset; 37 pass against the twin's file; a one-byte drift still fails).Review fix 3 (the last round, accepted from the same review):
ci: refuse control characters in the payloadadds one condition to the validation gate,and (.client_payload | [.[] | test("[\u0000-\u001f\u007f]")] | any | not), which refuses a control character in any payload field. An environment variable ends at a NUL, so the checks on the variables saw only what preceded it and step 2 passed a payload that the CLI refused later; the gate reads the event file, which holds all of it. The condition also refuses a final newline, so the separateendswithguard on the token andrepull_idwas redundant and is removed: while both existed, dropping either one changed nothing, so neither could be pinned alone.test: pin the repull hardening and control checkadds cases to the mask test and the refusal test (the counts do not change: 34 pass, 3 skip, 37 pass against the twin's file): a token with a carriage return,abc\r::warning::forged, is masked per line, so no line starts with::warning::; a token with a final newline, an emptyrepull_idand arepull_idof1\nare refused; a NUL in each of the nine fields is refused, with the job environment cut at the NUL as the runner cuts it. The refusal cases are collected, so a weakened check lists every case it lets through. Each case fails on its own mutant: droppingtr '\r' '\n'fails the carriage-return mask case; dropping the control check lets through the token and1\nfinal-newline cases and the seven NUL cases the shell checks cannot see; accepting an emptyrepull_idlets through exactly the empty case; and, before the guard was removed, dropping it let through the final-newline cases (token only,repull_idonly, both). Against the file as first reviewed the new cases fail too, except1\n, which that file already refused. The expression gives identical results on jq 1.8.2, Apple's jq 1.7.1 and Ubuntu 24.04's jq 1.7.1 (the runner's package) over the review's hostile-event harness, which still refuses every case it refused before.actionlintandshellcheckreport nothing on the run scripts. The twin carries the same bytes (a3dc47c, sha256ccb8a657ac61bd43dbc3105efede0c5101bc34e484b76471e91d75cd8a66c259,cmpexit 0).Part of epic #1046.