Skip to content

fix(ci): repair notebook-sync workflow syntax (Closes #695)#694

Merged
gHashTag merged 1 commit into
masterfrom
fix/notebook-sync-workflow-syntax
May 18, 2026
Merged

fix(ci): repair notebook-sync workflow syntax (Closes #695)#694
gHashTag merged 1 commit into
masterfrom
fix/notebook-sync-workflow-syntax

Conversation

@gHashTag
Copy link
Copy Markdown
Owner

@gHashTag gHashTag commented May 18, 2026

Closes #695

Summary

.github/workflows/notebook-sync.yml has been failing instantly on every push since the merge of PR #693 — runs complete in seconds with conclusion=failure, zero jobs dispatched, and gh run view --log-failed reports 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.

  1. workflow_dispatch: declared at the top level instead of nested under on:. In YAML, the bare key on is parsed as boolean True, and a sibling top-level workflow_dispatch: is rejected as an unexpected workflow section. All ${{ inputs.* }} references inside manual-sync became undefined.
  2. extract-issue.outputs.event_type referenced steps.event.outputs.type while the actual step id is event_type.
  3. Duplicate pull_request_review) case in the bash event dispatch (lines 74-78 and 79-84 of the original file).
  4. peter-evans/create-or-update-file@v3 does not exist on github.com (gh api repos/peter-evans/create-or-update-file → 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; granted permissions.contents: write on the sync-notebook job (default GITHUB_TOKEN scope was Contents: read). The status-file commit targets the repo's default branch (resolved via repos.get) because issues and pull_request events do not have a single canonical branch to commit to; the step is wrapped in continue-on-error plus an internal try/catch so a 403/422 from fork PRs or branch protection logs a warning instead of failing the sync — matching the existing best-effort pattern around the python sync.py || warnings; exit 0 block immediately above.

Files changed

  • .github/workflows/notebook-sync.yml — syntax repair (3 defects) + replacement of the broken sync-notebook "Update sync status as commit" step with an actions/github-script API call. Added a tight permissions: contents: write block on the sync-notebook job.
  • docs/NOW.md — entry added per the NOW Sync Gate.

Validation

actionlint 1.7.12 before fix:

:23:1: unexpected key "workflow_dispatch" for "workflow" section ... [syntax-check]
:47:23: property "event" is not defined in object type {event_type: ...} [expression]
:244:26: property "issue_number" is not defined ... [expression]
:245:26: property "sync_type" is not defined ... [expression]
:266:13: property "sync_type" is not defined ... [expression]

actionlint 1.7.12 after fix: all syntax-check and expression errors clear. Only the pre-existing low-severity advisory about github.event.issue.title being interpolated into an inline script remains — unrelated to the instant-failure issue and out of scope here.

Python yaml.safe_load:

on triggers: ['issues', 'issue_comment', 'pull_request',
              'pull_request_review', 'push', 'workflow_dispatch']
workflow_dispatch inputs: ['issue_number', 'sync_type']
jobs: ['extract-issue', 'sync-notebook', 'sync-activity', 'manual-sync']
sync-notebook permissions: {'contents': 'write'}

Action existence verified via gh api:

$ gh api repos/peter-evans/create-or-update-file
{"message":"Not Found","status":"404"}

Testing

  • actionlint syntax-check passes.
  • yaml.safe_load confirms on: contains all six triggers and workflow_dispatch.inputs is properly nested.
  • CI on this PR now schedules all four jobs (extract-issue, sync-notebook, sync-activity, manual-sync) instead of failing instantly with empty job list.
  • sync-notebook job is green on this PR (status-file write resolves the default branch and uses continue-on-error + internal try/catch).
  • After merge: verify the "Run workflow" button appears in the Actions UI for notebook-sync (proves workflow_dispatch is valid), and that a push to any feature/** / fix/** / ring-*/** / issue-*/** branch dispatches jobs cleanly.

L7 UNITY note

YAML/actions-side repair only. No *.sh added, no gen/ edits, no spec changes. RTL/GDS/verdict.json gates untouched. TRI-NET docs package from #693 untouched.

@github-actions
Copy link
Copy Markdown

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions
Copy link
Copy Markdown

PR Dashboard

Generated at: 2026-05-18 03:48:04 UTC

Summary

Status Count
Total Open PRs 15
PRs with Failing Checks 13
PRs with All Checks Green 2
READY 1
FAILING 13
PENDING 0

@gHashTag gHashTag force-pushed the fix/notebook-sync-workflow-syntax branch from 0a42314 to fb98874 Compare May 18, 2026 03:52
@github-actions
Copy link
Copy Markdown

PR Dashboard

Generated at: 2026-05-18 03:52:54 UTC

Summary

Status Count
Total Open PRs 15
PRs with Failing Checks 14
PRs with All Checks Green 1
READY 1
FAILING 14
PENDING 0

@github-actions
Copy link
Copy Markdown

📓 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>
@gHashTag gHashTag force-pushed the fix/notebook-sync-workflow-syntax branch from fb98874 to bf74b0b Compare May 18, 2026 03:54
@github-actions
Copy link
Copy Markdown

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions
Copy link
Copy Markdown

PR Dashboard

Generated at: 2026-05-18 03:54:41 UTC

Summary

Status Count
Total Open PRs 15
PRs with Failing Checks 14
PRs with All Checks Green 1
READY 1
FAILING 14
PENDING 0

@gHashTag gHashTag changed the title fix(ci): repair notebook-sync workflow syntax (instant failures, no logs) fix(ci): repair notebook-sync workflow syntax (Closes #695) May 18, 2026
@gHashTag gHashTag merged commit d11bc6f into master May 18, 2026
21 of 22 checks passed
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.

ci(notebook-sync): workflow fails instantly with empty job list (post-#693)

2 participants