Skip to content

test(verify): sweep a configuration into the variants a parity run needs - #8388

Open
kz930 wants to merge 7 commits into
apache:mainfrom
kz930:feat/verify-sweep-configuration-variants
Open

test(verify): sweep a configuration into the variants a parity run needs#8388
kz930 wants to merge 7 commits into
apache:mainfrom
kz930:feat/verify-sweep-configuration-variants

Conversation

@kz930

@kz930 kz930 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

One configuration exercises one path through an operator. A parity run wants
more than that: every value an enum offers, the optional knobs a default leaves
empty, and a text knob carrying a value that breaks a Python literal if it was
spliced rather than escaped.

This adds the sweep on top of the generator that derives the configuration. Four
entry points return variants: one for an operator configured from its
annotations, and three for a hand-written fixture, which needs them more, since
the configuration it pins is otherwise the only one its operator ever runs.

The sweep moves one knob at a time rather than crossing them, so a failure names
the knob that caused it. The exceptions are the two variants that move every
knob of a kind at once, where bisecting by hand costs less than a run per field:
all optional knobs filled together, and all free-text knobs carrying the hostile
value together, numbered so no two knobs carry the same text. Two knobs sharing
one value is not a smaller version of the same test. Where both name an output
column, it writes the same column twice and the run fails for a reason that has
nothing to do with escaping.

Any related issues, documentation, discussions?

Part of #8325, which lists the set in order. This is the second half of the
seventeenth entry, and #8361 is the first. The two are one Scala object, so this
branch carries that one's commit as well: the sweep does not compile without the
members it defines. Until #8361 merges the file view here shows both halves, and
once it does this narrows to the sweep on its own. The last commit is the sweep,
and it is the one to read.

How was this PR tested?

Four tests read the entry points rather than the members behind them: an enum
offered once per value with each variant labelled by the knob it moved, a
boolean flipped in a variant of its own, an optional knob the base leaves empty
and this fills, and two free-text knobs that come out holding different text.

The sweep is exercised end to end once the last pieces of the set land, when
every operator runs through the engine and through its generated script and the
two answers are compared. These four cover it in the meantime, and they name the
knob rather than the operator when they fail.

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

Generated-by: Claude Code (Opus 5)

kz930 and others added 5 commits September 2, 2026 16:30
An operator is configured by a form, and the form is generated from the
descriptor's own annotations. The same annotations are enough to fill it
without a human: an enum offers its constants, a column knob takes a column of
the type its rule allows, a numeric knob its declared bounds, and a
conditional field is filled only where the branch that shows it is taken.

This is one file because it is one decision made repeatedly — what a knob may
hold — and splitting it would put half of that decision on either side of a
boundary.

`@SampleColumn` names the column a knob means where a type cannot say it: the
opening price among four numbers, the country code among several strings.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A candlestick reads four prices and the day they belong to, which a type
cannot tell apart; a choropleth reads a country code the same way, and a
value to shade it by that a type rule does narrow. Both are what the
annotation and the rule are for.

These read operators that land before this change does, so they belong here
rather than being added back afterwards.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The generator did two jobs in one file: derive a valid configuration for an
operator from the annotations it already carries, and sweep that configuration
into the variants a parity run needs. At two thousand lines it was the largest
change in the export series and the only one that could not be read in one
sitting.

This change leaves the first job. The sweep follows as its own change on top of
it, restoring the members verbatim.

The two jobs share no member. The base pass reaches its values through
buildObject, decide and valueFor; the sweep reaches its own through rowFills,
columnFill and leafFill, and the four entry points that return variants are the
only callers of either. Nothing was rewritten to make the seam: whole members
moved out, and every line that stays is the line that was there.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
One configuration exercises one path through an operator. A parity run wants
more than that: every value an enum offers, the optional knobs a default leaves
empty, and a text knob carrying a value that breaks a Python literal if it was
spliced rather than escaped.

This adds the sweep on top of the generator that derives the configuration.
Four entry points return variants: one for an operator configured from its
annotations, and three for a hand-written fixture, which needs them more, since
the configuration it pins is otherwise the only one its operator ever runs.

The sweep moves one knob at a time rather than crossing them, so a failure names
the knob that caused it. The exceptions are the two variants that move every
knob of a kind at once, where bisecting by hand costs less than a run per field:
all optional knobs filled together, and all free-text knobs carrying the hostile
value together, numbered so no two knobs carry the same text.

The four tests read the entry points rather than the members behind them: an
enum offered once per value, a boolean flipped in a variant of its own, an
optional knob the base leaves empty and this fills, and two free-text knobs that
come out holding different text.

Every member here was in the change before this one and is restored verbatim.

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 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

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

  • No candidates found from git blame history.

@codecov-commenter

codecov-commenter commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.10%. Comparing base (7976744) to head (6bc5fef).
⚠️ Report is 13 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8388      +/-   ##
============================================
- Coverage     94.11%   94.10%   -0.02%     
- Complexity     4811     4858      +47     
============================================
  Files          1197     1203       +6     
  Lines         48813    48967     +154     
  Branches       5906     5930      +24     
============================================
+ Hits          45939    46079     +140     
+ Misses         1420     1419       -1     
- Partials       1454     1469      +15     
Flag Coverage Δ *Carryforward flag
access-control-service 81.00% <ø> (ø)
agent-service 99.32% <ø> (ø) Carriedforward from f93a178
amber 90.08% <ø> (ø) Carriedforward from f93a178
computing-unit-managing-service 73.67% <ø> (ø) Carriedforward from f93a178
config-service 87.12% <ø> (+0.12%) ⬆️
file-service 87.91% <ø> (ø) Carriedforward from f93a178
frontend 96.86% <ø> (ø) Carriedforward from f93a178
notebook-migration-service 83.57% <ø> (+4.26%) ⬆️
pyamber 98.47% <ø> (ø) Carriedforward from f93a178
workflow-compiling-service 77.19% <ø> (ø) Carriedforward from f93a178

*This pull request uses carry forward flags. Click here to find out more.

☔ 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 2 commits September 3, 2026 15:00
`variantsOf` swept an already-configured op for its enums alone. Every caller
wants the optional and hostile-text variants with them, which is the entry point
beside it, so this one was never called.

Its scaladoc explained itself by contrast with that one, so the explanation moves
there rather than going with it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The optional-scalar fill repeated, sentence for sentence, why the column fill
beside it exists. It points there instead. The pointer helper's one-line
description said what its one-line body says.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature platform Non-amber Scala service paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants