Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/notebook-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,20 @@ jobs:
exit 1
fi

# Amputation tripwire (#20174): the ZERO guard above is not enough.
# A sparse-checkout residue can leave a handful of stray .ipynb
# OUTSIDE the notebook tree (measured 2026-10-10, run 38015702551 on
# PR #19814: exactly 2 probe notebooks under scripts/notebook_tools/,
# zero under MyIA.AI.Notebooks/ out of 1516) — NB_COUNT stays > 0,
# the guard stays silent, and the C.2 catalog filter downstream then
# matches nothing. The corpus only grows, so 1000 is a floor far
# below the real count and far above any partial tree.
NB_TREE_COUNT=$(find MyIA.AI.Notebooks -name "*.ipynb" -not -path "*/.ipynb_checkpoints/*" -not -path "*/.*/*" | wc -l)
if [ "$NB_TREE_COUNT" -lt 1000 ]; then
echo "::error::MyIA.AI.Notebooks holds $NB_TREE_COUNT .ipynb (floor 1000, expected ~1500) — checkout amputated (sparse-checkout residue, #20174); NB_COUNT=$NB_COUNT across the whole tree"
exit 1
fi

if [ $ERRORS -gt 0 ]; then
echo "FAILED: $ERRORS notebook(s) with errors"
exit 1
Expand Down
10 changes: 10 additions & 0 deletions scripts/notebook_tools/check_c2_compliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,16 @@ def main():

targets = get_target_notebooks(args)
if not targets:
# JSON mode is the workflow's crash/completion disambiguator (#14799):
# a completing run ALWAYS prints its report, and prose is not a report.
# An empty selection must surface as an empty JSON list, never as
# prose that kills the downstream parser ("Expecting value: line 1
# column 1"). Measured instance (2026-10-10, run 38015702551): an
# amputated runner checkout (#20174) left zero notebooks under
# MyIA.AI.Notebooks/, so the catalog filter matched nothing.
if args.json:
print("[]")
return 0
print("No notebooks to check.")
return 0

Expand Down
Loading