fix(ci): repair notebook-sync workflow syntax (Closes #695)#694
Merged
Conversation
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
0a42314 to
fb98874
Compare
PR DashboardGenerated at: 2026-05-18 03:52:54 UTC
Summary
|
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Three defects in .github/workflows/notebook-sync.yml combined to make
GitHub Actions reject the file at parse time, so every run failed
instantly with conclusion=failure, zero jobs dispatched, and
`gh run view --log-failed` returned "log not found":
1. workflow_dispatch: was declared at the top level instead of nested
under on:. The bare key `on` is parsed as YAML True, and a sibling
top-level workflow_dispatch: is rejected by Actions as an unexpected
workflow section. All ${{ inputs.* }} references downstream were
thus undefined.
2. extract-issue.outputs.event_type referenced steps.event.outputs.type
but the actual step id is event_type.
3. Duplicate pull_request_review) case in the bash case block.
In addition, once the workflow parses and dispatches jobs, the
sync-notebook job failed at action-resolution time:
4. peter-evans/create-or-update-file@v3 does not exist on github.com
(404 — the canonical peter-evans actions are create-pull-request,
create-or-update-comment, create-issue-from-file, etc.). Replaced
with actions/github-script@v7 using
github.rest.repos.createOrUpdateFileContents via the REST API.
Added permissions.contents: write on the sync-notebook job
(default GITHUB_TOKEN scope was Contents: read).
Validation:
- actionlint 1.7.12: all syntax-check and expression errors clear.
Only a pre-existing low-severity advisory about
github.event.issue.title being potentially untrusted in an inline
script remains, unrelated to the instant-failure issue.
- python yaml.safe_load: on: now contains all six triggers including
workflow_dispatch with inputs [issue_number, sync_type]; four jobs
defined; extract-issue.outputs.event_type resolves to the correct
step id.
L7 UNITY held: YAML/actions-side repair only — no *.sh added, no gen/
edits, no spec changes. RTL/GDS/verdict.json gates untouched.
docs/NOW.md updated per NOW Sync Gate.
Closes #695
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
fb98874 to
bf74b0b
Compare
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
PR DashboardGenerated at: 2026-05-18 03:54:41 UTC
Summary
|
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.
Closes #695
Summary
.github/workflows/notebook-sync.ymlhas been failing instantly on every push since the merge of PR #693 — runs complete in seconds withconclusion=failure, zero jobs dispatched, andgh run view --log-failedreports log not found. Latest broken example before this PR: run 26011951927.Three syntax-level defects combined to make GitHub Actions reject the workflow during parse, and one latent runtime defect surfaced once jobs began dispatching.
workflow_dispatch:declared at the top level instead of nested underon:. In YAML, the bare keyonis parsed as booleanTrue, and a sibling top-levelworkflow_dispatch:is rejected as an unexpected workflow section. All${{ inputs.* }}references insidemanual-syncbecame undefined.extract-issue.outputs.event_typereferencedsteps.event.outputs.typewhile the actual step id isevent_type.pull_request_review)case in the bash event dispatch (lines 74-78 and 79-84 of the original file).peter-evans/create-or-update-file@v3does not exist on github.com (gh api repos/peter-evans/create-or-update-file→ 404). The canonical peter-evans actions arecreate-pull-request,create-or-update-comment,create-issue-from-file, etc. Replaced withactions/github-script@v7usinggithub.rest.repos.createOrUpdateFileContentsvia the REST API; grantedpermissions.contents: writeon thesync-notebookjob (default GITHUB_TOKEN scope wasContents: read). The status-file commit targets the repo's default branch (resolved viarepos.get) becauseissuesandpull_requestevents do not have a single canonical branch to commit to; the step is wrapped incontinue-on-errorplus an internaltry/catchso a 403/422 from fork PRs or branch protection logs a warning instead of failing the sync — matching the existing best-effort pattern around thepython sync.py || warnings; exit 0block immediately above.Files changed
.github/workflows/notebook-sync.yml— syntax repair (3 defects) + replacement of the brokensync-notebook"Update sync status as commit" step with anactions/github-scriptAPI call. Added a tightpermissions: contents: writeblock on thesync-notebookjob.docs/NOW.md— entry added per the NOW Sync Gate.Validation
actionlint 1.7.12before fix:actionlint 1.7.12after fix: all syntax-check and expression errors clear. Only the pre-existing low-severity advisory aboutgithub.event.issue.titlebeing interpolated into an inline script remains — unrelated to the instant-failure issue and out of scope here.Python
yaml.safe_load:Action existence verified via
gh api:Testing
actionlintsyntax-check passes.yaml.safe_loadconfirmson:contains all six triggers andworkflow_dispatch.inputsis properly nested.extract-issue,sync-notebook,sync-activity,manual-sync) instead of failing instantly with empty job list.sync-notebookjob is green on this PR (status-file write resolves the default branch and usescontinue-on-error+ internal try/catch).notebook-sync(provesworkflow_dispatchis valid), and that a push to anyfeature/**/fix/**/ring-*/**/issue-*/**branch dispatches jobs cleanly.L7 UNITY note
YAML/actions-side repair only. No
*.shadded, nogen/edits, no spec changes. RTL/GDS/verdict.jsongates untouched. TRI-NET docs package from #693 untouched.