Skip to content

test(verify): run every operator both ways and report what it did - #8362

Open
kz930 wants to merge 44 commits into
apache:mainfrom
kz930:feat/verify-run-every-operator
Open

kz930 wants to merge 44 commits into
apache:mainfrom
kz930:feat/verify-run-every-operator

Conversation

@kz930

@kz930 kz930 commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

The runner discovers the operators that implement the trait, configures each
from its schema, runs it through the engine and through its generated script,
and compares. An operator that cannot be run is reported as a row with the
reason rather than passed over, since an operator missing from the report is
a fact the report has to carry.

OperatorBehaviorSpec is what turns that into tests: one per operator per
configuration its schema offers, named so a single operator can be run alone.

Every operator reads one canonical table, and it now also carries the values a type reaches only at its edges. That means a double at 1e7 and past it, and one under 1e-3, which Java writes in E notation. It means timestamps in 1600, 2262, 2500 and 9999, outside pandas' nanosecond range. And it means text of digits with leading zeros, which a reader must not take for a number. Without them, a difference that only shows at those values is never asked about. It also carries views, its one LONG column, with counts past 2^31 on both sides of an int's limit.

Bullet and Gauge are compared by the figures their script writes, now that it writes every one rather than the first.

A whole workflow is compared too. WorkflowParitySpec, in amber's integration tests, runs each plan in the engine and through its translated script, and compares every leaf. Rows compare as a set unless the leaf's operator declares an order, since the engine runs most operators on several workers. Every plan reads the shared table, written at run time as the CSV the CSV source reads, once whole and once with a hole in every column. The plans are aimed at how fragments go wrong together: a chain, a cast to text, a Union of two halves that share no row, both branches of a Split, a holed integer column, a cast date, and a column named like a placeholder. File Scan reads the shared table's own file from the path Text Input names. TranslatedPlanRunSpec keeps the two the engine has nothing to compare with: two charts in one plan, and a chart that cannot be drawn.

amber's tests take the compiling service's and workflow-operator's classes and test resources, not the modules themselves. The compiling service brings dropwizard 4, which would evict the dropwizard 1 amber is built on.

Runs whose reason is that both paths raise are no longer skipped. They sit in their own list, variantsBothRefuse, run like any other, and pass only when the engine and the script both refuse, since a script that answers where the engine refuses is as wrong as a different answer. Only a run named there may pass on two errors, so a broken environment cannot turn the suite green. The one exception found is the dummy classifier on an empty table: it fits on nothing into a model that cannot predict, so it stays in variantsNotRun with that reason. File Scan reads the canonical table's own JSON, which both paths refuse as an archive and as a typed line, so those variants are listed there too. Its archives and typed lines are compared on real files, in the scenarios #8364 and #8363 add. A large binary is written to object storage, which the harness does not give the executor, so that variant is in variantsNotRun.

Any related issues, documentation, discussions?

Part of #8325, 23 of 27; that issue lists the set in order. It does not compile until #8357, #8358, #8359, #8509, #8363 and #8388 land. It calls PyOpExecHarness from #8357, StandaloneRunner from #8358, Comparator from #8359, the two chart comparators from #8509, CuratedHandlers from #8363, and ConfigGenerator.generateVariants from #8388, which builds on #8361. The edge values pass only once #8341, #8704, #8357, #8709, #8710 and #8597 are in. Each of those fixes how one path reads or writes them. All of them come earlier in the set or merge before it. An empty table runs on every operator once #8766 is in, which hands a port that carried no rows its declared columns.

Closes #8425, the task this change is the whole of.

The workflow-level comparison answers the review that asked for plans run end to end. It calls runTranslated from #8358.

Reading the shared table across a whole plan found two engine defects that the per-operator runs cannot reach. #9074, where result storage moved a timestamp before 1883, is fixed by #9076, which these plans need. #9077, where a Python operator pauses the run on a LONG column holding a null and a value past 2^53, is still open, so the chain projects before its sort until it is fixed.

How was this PR tested?

The tests in this change cover it. The whole set is exercised together once the last piece lands: every operator run through the engine and through its generated script, and the two answers compared.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5, Claude Opus 5.5)

The runner discovers the operators that implement the trait, configures each
from its schema, runs it through the engine and through its generated script,
and compares. An operator that cannot be run is reported as a row with the
reason rather than passed over, since an operator missing from the report is
a fact the report has to carry.

`OperatorBehaviorSpec` is what turns that into tests: one per operator per
configuration its schema offers, named so a single operator can be run alone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added feature platform Non-amber Scala service paths labels Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Committers with relevant context: @parshimers
    You can request their reviews formally with /request-review @parshimers.

  • Contributors with relevant context: @mengw15
    You can notify them by mentioning @mengw15 in a comment.

@codecov-commenter

codecov-commenter commented Sep 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.85%. Comparing base (09f4b46) to head (b293b67).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8362      +/-   ##
============================================
- Coverage     91.86%   91.85%   -0.01%     
+ Complexity     5162     5159       -3     
============================================
  Files          1310     1310              
  Lines         58440    58440              
  Branches       7629     7629              
============================================
- Hits          53686    53682       -4     
- Misses         2861     2862       +1     
- Partials       1893     1896       +3     
Flag Coverage Δ
access-control-service 77.44% <ø> (ø)
agent-service 99.57% <ø> (ø)
amber 86.08% <ø> (-0.02%) ⬇️
computing-unit-managing-service 63.96% <ø> (ø)
config-service 87.50% <ø> (ø)
file-service 82.18% <ø> (ø)
frontend 96.50% <ø> (-0.01%) ⬇️
notebook-migration-service 83.84% <ø> (ø)
pyamber 98.63% <ø> (ø)
result-service 86.48% <ø> (ø)
workflow-compiling-service 80.90% <ø> (ø)

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

kz930 and others added 9 commits September 2, 2026 16:51
Three examples where one carries the point, and a cross-reference the
reader can follow without being told to.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…erator's issue

The row pointed at the issue for Substring Search and Unnest String, which
this operator was never part of. That issue closes with the change that
answers those two, and this one still raises.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The row said the platform raised on an empty cell. The operator answers one
now, so the variant runs like every other.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…re in

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both had been withheld for drawing a different picture on every run, which
stopped being true once their placement was seeded. The registration is inert
until the operator implements the trait, so it can sit here rather than making
the change that gives them their generator depend on this one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Which tier an operator lands in is the one thing the per-operator runs do not
check, so it is what this spec is for. Every visualization, the scorer, an
estimator and an advanced trainer each state where they route and why that is
not the tier they used to be in.

All of them land before this change does, so the assertions hold when it
merges rather than needing to be added back afterwards.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
One assertion per line, like every other test here. The loop it replaced was
the only one of its kind in the file.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
One said the coverage report prints the withheld runs together. It no longer
prints them, so what is left is the reason that does not depend on a reader:
one table means the next exemption has an obvious home.

The other pointed at `TransformHandler.unfillableVariants`, which does not
exist. What it meant is `nullsKeepFilled`, the one thing a handler still says
about its own table rather than about its operator.

`withheldRunsFor` was public for the report that read it. Its only caller now
is beside it, so it says so.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@carloea2 carloea2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The transform verification runner looks good.

@kz930
kz930 marked this pull request as draft September 4, 2026 17:12
The configuration generator produces it; this is the label a withholding would
have to name. A paragraph the one below it already carried goes with it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@kz930
kz930 force-pushed the feat/verify-run-every-operator branch from e450a54 to f1e3d14 Compare September 9, 2026 06:50

@carloea2 carloea2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed alongside the related export and verification PRs. These findings are based on code inspection and focused Python checks, not a full Scala suite run.

@kz930
kz930 force-pushed the feat/verify-run-every-operator branch from a8a3653 to eb8b5aa Compare September 9, 2026 23:36
Every other verify spec runs one operator's fragment with the harness
binding its placeholders, so a fault that only appears once fragments
share a script and a directory has nowhere to show. Three of those are
pinned here: a column named after a placeholder, two charts writing one
file, and a branch that ends the process the other branches still need.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@kz930
kz930 force-pushed the feat/verify-run-every-operator branch from eb8b5aa to b052093 Compare September 9, 2026 23:46
@kz930

kz930 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

@carloea2 The fixture cycle is split. CanonicalSourceFixture now lives in this PR's CanonicalFixture.scala (4f26a62), so this no longer needs anything from #8364, and the #8358 and #8359 findings were fixed in the heads you approved on 10-24. Could you take another look?

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

🟢 0 better · 🔴 6 worse · ⚪ 9 noise (<±5%) · 0 without baseline

Compared against main 09f4b46 benchmarked on this same runner, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🔴 bs=10 sw=10 sl=64 510 0.311 18,121/26,872/26,872 us 🔴 +11.4% / 🔴 +97.8%
🔴 bs=100 sw=10 sl=64 1,222 0.746 80,926/138,170/138,170 us 🔴 +28.0% / 🔴 +59.5%
⚪ bs=1000 sw=10 sl=64 1,442 0.88 694,058/739,642/739,642 us ⚪ within ±5% / 🟢 -14.9%
Baseline details

Latest main 09f4b46 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 510 tuples/sec 569 tuples/sec 951.52 tuples/sec -10.4% -46.4%
bs=10 sw=10 sl=64 MB/s 0.311 MB/s 0.347 MB/s 0.581 MB/s -10.4% -46.4%
bs=10 sw=10 sl=64 p50 18,121 us 18,434 us 10,458 us -1.7% +73.3%
bs=10 sw=10 sl=64 p95 26,872 us 24,128 us 13,588 us +11.4% +97.8%
bs=10 sw=10 sl=64 p99 26,872 us 24,128 us 16,907 us +11.4% +58.9%
bs=100 sw=10 sl=64 throughput 1,222 tuples/sec 1,231 tuples/sec 1,316 tuples/sec -0.7% -7.1%
bs=100 sw=10 sl=64 MB/s 0.746 MB/s 0.751 MB/s 0.803 MB/s -0.7% -7.1%
bs=100 sw=10 sl=64 p50 80,926 us 79,004 us 79,582 us +2.4% +1.7%
bs=100 sw=10 sl=64 p95 138,170 us 107,916 us 86,610 us +28.0% +59.5%
bs=100 sw=10 sl=64 p99 138,170 us 107,916 us 93,834 us +28.0% +47.2%
bs=1000 sw=10 sl=64 throughput 1,442 tuples/sec 1,411 tuples/sec 1,347 tuples/sec +2.2% +7.0%
bs=1000 sw=10 sl=64 MB/s 0.88 MB/s 0.861 MB/s 0.822 MB/s +2.2% +7.0%
bs=1000 sw=10 sl=64 p50 694,058 us 706,384 us 779,301 us -1.7% -10.9%
bs=1000 sw=10 sl=64 p95 739,642 us 755,236 us 826,344 us -2.1% -10.5%
bs=1000 sw=10 sl=64 p99 739,642 us 755,236 us 868,973 us -2.1% -14.9%
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,392.53,200,128000,510,0.311,18121.09,26871.69,26871.69
1,100,10,64,20,1636.65,2000,1280000,1222,0.746,80926.39,138169.96,138169.96
2,1000,10,64,20,13873.74,20000,12800000,1442,0.880,694058.02,739641.67,739641.67

kz930 and others added 2 commits November 12, 2026 16:25
…ry-operator

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The compiler now takes the resolver its caller supplies for a scan
source's file. Both plan specs read local CSVs, so they pass the
fixture resolver main's own tests use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@carloea2 carloea2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One cleanup problem reproduced locally.

Every run left its inputs, scripts and outputs behind, which added up to
gigabytes across the operators. A passing run now deletes its directory. A
failing one keeps it and names the path in the failure message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kz930

kz930 commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

@carloea2 Passing runs now delete their temporary directory. A full OperatorBehaviorSpec run on the integration branch left none behind. Could you take another look?

@kz930
kz930 requested a review from carloea2 November 17, 2026 18:25

@carloea2 carloea2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cleanup still fails with pooled workers on Windows.

@kz930
kz930 requested a review from carloea2 November 22, 2026 22:12
@kz930
kz930 marked this pull request as ready for review November 24, 2026 02:10
@kz930

kz930 commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

@carloea2 May you take a look at this PR?

@carloea2 carloea2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reproduced both chart test failures locally and found a false pass in the refusal check. The Amber CI log also shows the parity suite cannot find its Python executable.

kz930 and others added 2 commits December 1, 2026 13:11
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the ci changes related to CI label Dec 1, 2026
…ports

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kz930

kz930 commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

@carloea2 All three are fixed and CI is green. Could you take another look?

IndentationError and TabError are subclasses of SyntaxError, but the
check matched only the exact name on the traceback's last line, so a
badly indented script still counted as a refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kz930

kz930 commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

@carloea2 The IndentationError case is fixed in ff8cce6, and the check now also covers TabError. Could you take another look?

@kz930
kz930 requested a review from carloea2 December 3, 2026 02:19

@carloea2 carloea2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retested the malformed filter. The indentation error now fails the refusal check, and a genuine input rejection still passes. All 64 focused tests passed locally.

@carloea2 carloea2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow and operator checks cover the earlier findings. The current checks pass. Looks good.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

amber-integration ci changes related to CI common dependencies Pull requests that update a dependency file feature infra platform Non-amber Scala service paths workflow-to-python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run every operator both ways and report what it did

4 participants