• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ponder-lab / Hybridize-Functions-Refactoring / #2372
81%
main: 83%

Build:
Build:
LAST BUILD BRANCH: dependabot/github_actions/actions/setup-python-7
DEFAULT BRANCH: main
Ran 08 Jul 2026 12:46AM UTC
Jobs 1
Files 32
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Jul 2026 12:42AM UTC coverage: 80.613% (+0.4%) from 80.202%
#2372

Pull #743

github

khatchad
Add a parameter-flow numpy safety precondition

A function whose body (transitively) applies a numpy/scipy API to a value flowing from its parameters crashes on first call under `@tf.function` tracing, once the parameters become symbolic tensors. The gate is an SSA def-use taint slice rather than a points-to intersection: a points-to-keyed gate silently passes a crasher under any modeling gap that empties a points-to set, and this precondition exists precisely to hold while upstream modeling is in motion (wala/ML#696's generator fix re-types `compute_loss`'s parameters; this precondition is what makes that safe to absorb).

Taint policy per the design on #740: sources are the parameter value numbers (the receiver excluded for instance methods); propagation is worklist-based over def-use chains; property reads of `shape`/`dtype` launder taint (probe-verified trace-time available on TensorFlow 2.9.3, admitting the `PositionEncoding.call` idiom); sinks are invocations whose callee chain roots at the numpy/scipy module (points-to preferred, import-alias fallback over `numpy`/`np`/`scipy`/`sp` globals—whose over-recognition here over-blocks, the inverse of the TensorFlow chain walk's trade); tainted positional arguments cross into user callees and tainted returns flow back, memoized with a cycle guard.

The failure (`HAS_NUMPY_CALLS_ON_PARAMETERS`, code 16) joins the safety family after `HAS_EAGER_ONLY_CALLS` and before the barren benefit signal. `alwaysCheckNumpyCalls` mirrors the sibling knobs end-to-end (`EvaluationOption`, evaluator handler, `run-headless-evaluator.sh` `CHECK_NUMPY_CALLS`, "numpy calls on parameters"/"numpy calls" CSV columns).

`testNumpyCallsOnParametersBlockHybridization` pins the direct sink, argument-flow into a callee, and the return-flow chain, with clean-callee and no-numpy P1 controls; `testNumpyCallsSanitizedByShape` pins the trace-time carve-out.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https:/... (continued)
Pull Request #743: Add a safety precondition for numpy applied to parameter-flowing values

94 of 105 new or added lines in 4 files covered. (89.52%)

14 existing lines in 1 file now uncovered.

1921 of 2383 relevant lines covered (80.61%)

0.81 hits per line

Uncovered Changes

Lines Coverage ∆ File
5
89.12
1.85% edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Util.java
4
93.62
-0.29% edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Function.java
2
70.28
-0.18% edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/refactorings/HybridizeFunctionRefactoringProcessor.java

Coverage Regressions

Lines Coverage ∆ File
14
89.12
1.85% edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Util.java
Jobs
ID Job ID Ran Files Coverage
1 #2372.1 08 Jul 2026 12:46AM UTC 32
80.61
Source Files on build #2372
  • Tree
  • List 32
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #743
  • PR Base - main (#)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc