Skip to content

Add characterization tests for effective-key equivalence#238

Merged
timkpaine merged 2 commits into
nk/auto_deps_auto_callable_modelfrom
tkp/effective-key-characterization
Jun 9, 2026
Merged

Add characterization tests for effective-key equivalence#238
timkpaine merged 2 commits into
nk/auto_deps_auto_callable_modelfrom
tkp/effective-key-characterization

Conversation

@timkpaine

Copy link
Copy Markdown
Member

The dependency-graph builder and cache-key path route every node through _effective_evaluation_key(). For models that do not opt into effective identity (everything except generated @Flow.model / BoundModel), the result must stay byte-for-byte identical to the structural cache_key().

Pin that equivalence so future changes to the effective path cannot silently shift cache or graph identity for ordinary CallableModel graphs:

  • effective cache_key == structural cache_key for simple, chain, and diamond graphs;
  • the dependency graph (root_id, node keys, edges) built via the effective path equals an independently-computed structural graph;
  • shared diamond leaves still dedupe to one node;
  • _build_dependency_graph returns the structural root key.

Test-only; no library changes.

The dependency-graph builder and cache-key path route every node through
`_effective_evaluation_key()`. For models that do not opt into effective
identity (everything except generated @Flow.model / BoundModel), the result
must stay byte-for-byte identical to the structural `cache_key()`.

Pin that equivalence so future changes to the effective path cannot silently
shift cache or graph identity for ordinary CallableModel graphs:

- effective cache_key == structural cache_key for simple, chain, and diamond graphs;
- the dependency graph (root_id, node keys, edges) built via the effective path
  equals an independently-computed structural graph;
- shared diamond leaves still dedupe to one node;
- `_build_dependency_graph` returns the structural root key.

Test-only; no library changes.

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Test Results

    1 files  ±0      1 suites  ±0   3m 3s ⏱️ +11s
1 168 tests +4  1 166 ✅ +4  2 💤 ±0  0 ❌ ±0 
1 174 runs  +4  1 172 ✅ +4  2 💤 ±0  0 ❌ ±0 

Results for commit 0cc4f41. ± Comparison against base commit 51396bc.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.03%. Comparing base (51396bc) to head (0cc4f41).

Additional details and impacted files
@@                         Coverage Diff                          @@
##           nk/auto_deps_auto_callable_model     #238      +/-   ##
====================================================================
+ Coverage                             93.01%   93.03%   +0.02%     
====================================================================
  Files                                   160      161       +1     
  Lines                                 17835    17892      +57     
  Branches                               1153     1160       +7     
====================================================================
+ Hits                                  16589    16646      +57     
  Misses                                 1020     1020              
  Partials                                226      226              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timkpaine timkpaine merged commit 88c5667 into nk/auto_deps_auto_callable_model Jun 9, 2026
20 checks passed
@timkpaine timkpaine deleted the tkp/effective-key-characterization branch June 9, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant