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

ponder-lab / Hybridize-Functions-Refactoring / #2372 / 1
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
Files 32
Run time 1s
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.1

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

1921 of 2383 relevant lines covered (80.61%)

0.81 hits per line

Source Files on job #2372.1
  • Tree
  • List 32
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 2372
  • 180736a5 on github
  • Prev Job for on implement-740-numpy-parameter-flow (##2371.1)
  • Next Job for on implement-740-numpy-parameter-flow (##2375.1)
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