fix(catalog): extend outputless-by-design for config calls (+14 BETA->PRODUCTION)#2018
Conversation
….style.use, etc.) Cells mixing imports + matplotlib configuration calls (plt.style.use(), plt.rcParams assignment, warnings.filterwarnings(), etc.) produce no Jupyter output and should not block PRODUCTION promotion. Extension adds: - ast.Import, ast.ImportFrom to the outputless tuple (from PR #2006) - ast.Expr nodes containing bare Call expressions (excluding print/display) for configuration-side-effect calls Impact: +14 notebooks promoted BETA->PRODUCTION in partition CPU/.NET (8 GameTheory Python, 3 Search, 3 Sudoku) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ETA->PRODUCTION) - Sudoku-1: Console.WriteLine after BacktrackingDotNetSolver class def - Sudoku-11: Console.WriteLine after IKVM DLL loading - Sudoku-14: Console.WriteLine after BDDConstraintPropagator exercise stub - Papermill .net-csharp: 3 notebooks, 68 cells total, 0 errors Also includes catalog _is_outputless_by_design() extension: - ast.Import/ImportFrom added to outputless tuple - ast.Expr with bare Call (excluding print/display) treated as config - +14 notebooks promoted BETA->PRODUCTION across partition Impact: Sudoku-1 and Sudoku-11 promoted BETA->PRODUCTION. Sudoku-14 still BETA (conclusion in PR #2006 awaiting merge). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Notebook PR Validation: PASS
Checks: H.1 (no errors), H.3 (execution_count), C.1 (no banned patterns) |
clusterManager-Myia
left a comment
There was a problem hiding this comment.
[Hermes] — CHANGES_REQUESTED
Concern 1 — Internal IP addresses in committed notebook outputs
3 C# notebooks contain .NET Interactive probing addresses with internal network IPs:
192.168.0.20:2048172.27.208.1:2048172.28.176.1:2048
These are development-environment artifacts that should not be committed. Either:
(a) Strip the HTML output from cell 1 (the .NET kernel probe script) and keep only the meaningful outputs, or
(b) Redact/sanitize the IP addresses before commit.
Concern 2 — generate_catalog.py change is clean ✓
The extension of _is_outputless_by_design to handle Import/ImportFrom and bare config calls (plt.style.use, np.set_printoptions, etc.) is well-reasoned. The exclusion list for print/display/pprint/show/render is correct.
Action required: Fix Concern 1 (IP leak), then re-request review.
…fig calls + maturity edge cases (cycle 84) (#2025) Fix broken test_import_not_outputless (imports now outputless-by-design since #2006/#2018). Add 27 new tests: - TestIsOutputlessByDesign: 11 config call branches (import, plt.style.use, warnings, np, display/pprint/show/render negatives) - TestClassifyMaturityCloud: 5 requires_cloud edge cases - TestClassifyMaturityKernel: 3 kernel edge cases - TestIsOutputlessConfigCalls: 6 AST-level edge cases - TestClassifyMaturityTodoBoundary: 4 tests verifying output-gate-priority behavior Extract _make_nb helper to module-level for cross-class reuse. All 2171 tests passing. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Extend
_is_outputless_by_design()ingenerate_catalog.pyto recognize code cells that mix imports with configuration calls (matplotlib style, warnings, numpy options) as outputless-by-design.Problem
Code cells like:
produce no Jupyter output (legitimately) but contain
ast.Exprnodes (plt.style.use()) that prevented detection as outputless-by-design. This blocked BETA->PRODUCTION promotion for notebooks where these were the only cells without output.Fix
ast.Import,ast.ImportFromto the outputless tuple (aligns with PR enrich(Sudoku,GameTheory,Search): add content-specific conclusions to 7 notebooks (4 BETA->PRODUCTION) #2006)ast.Exprnodes containing bareast.Callexpressions, EXCLUDINGprint()/display()/show()/render()/pprint()which DO produce outputImpact on partition CPU/.NET
Promoted notebooks: GT-2/4/5/6/9/10/11/14 (8 GameTheory Python), Search CSPs_Intro/App-17/Sudoku-8/18 (3+2), plus existing import-fix promotions.
Remaining BETA (10)
Tests
71/71 existing tests pass. No new tests needed (fix extends existing heuristic, test
test_productionvalidatesprint()exclusion).Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com