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

ponder-lab / Hybridize-Functions-Refactoring / #2632
83%
main: 84%

Build:
Build:
LAST BUILD BRANCH: gh-readonly-queue/main/pr-842-77b7f38fa055d4987502c13054242de54cacb165
DEFAULT BRANCH: main
Ran 01 Aug 2026 04:53AM UTC
Jobs 1
Files 34
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

01 Aug 2026 04:49AM UTC coverage: 83.423% (+0.3%) from 83.129%
#2632

push

github

web-flow
Add an unresolved statically-read-axis safety precondition (#817)

* Add an unresolved statically-read-axis safety precondition

The refactoring can write an inferred input signature that breaks a function which runs correctly today: a wildcard axis is `None` at trace time, and a body that reads that axis statically (`x.shape[i]`, `input_shape[i]`, `K.int_shape`) and consumes it where a Python integer is required then raises, or silently misbehaves through a `[:None]` slice. A dynamic read (`tf.shape(x)[i]`) returns a tensor and is safe, which is the distinction the check draws. Functions whose inferred signature leaves such an axis unresolved now fail with `HAS_UNRESOLVED_STATICALLY_READ_AXES` (code 18), the fourth safety failure in the P1 chain, and the condition also blocks every hybrid reconfigure path via `canReconfigure`.

Per the design settled on #811, `StaticShapeReadAnalysis` mirrors the parameter-flow numpy walk with three inversions: a static `.shape` read is the event of interest rather than laundered, carrying per-parameter provenance and covered axes narrowed by constant subscripts and prefix/suffix slices; `tf.shape`/`size`/`rank` are laundered instead; and descriptors join by union, so lost provenance widens toward declining, the conservative default the precondition requires. The sinks are the enumerated consumption sites observed in the corpus, held as string constants: a weight extent passed to `add_weight`, a `tf.reshape`/`tf.range` target (with element-through-container flow onto the written list), and integer arithmetic over a dimension. Keras lazy-`build` reachability covers both directions: the function's own `build` is a call-graph sibling under the `__call__` trampoline and is seeded by name-based lookup anchored to the first non-receiver parameter, while a sublayer's `build` is forward-reachable and seeded with unknown provenance, mirroring `subtractBuildProtocolContributions`'s reachability model. The verdict resolves each... (continued)

336 of 392 new or added lines in 4 files covered. (85.71%)

2778 of 3330 relevant lines covered (83.42%)

0.83 hits per line

Uncovered Changes

Lines Coverage ∆ File
36
88.64
edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/StaticShapeReadAnalysis.java
18
92.37
-1.09% edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Function.java
2
69.93
-0.17% edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/refactorings/HybridizeFunctionRefactoringProcessor.java
Jobs
ID Job ID Ran Files Coverage
1 #2632.1 01 Aug 2026 04:53AM UTC 34
83.42
Source Files on build #2632
  • Tree
  • List 34
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • ec22c753 on github
  • Prev Build on gh-readonly-queue/main/pr-821-70767b3b5810b1f898844755ef0c4871e4aa63e5
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