Add real-input regression validator for subchunk max-azimuth rev9/rev10#7
Add real-input regression validator for subchunk max-azimuth rev9/rev10#7nicklasorte wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 72492f3afc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| on_full_Pr_dBm, clutter_loss, custom_antenna_pattern, sub_point_idx); | ||
|
|
||
| out_rev9 = rev9_fun(); | ||
| out_rev10 = rev10_fun(); |
There was a problem hiding this comment.
Guard missing rev10 implementation before executing validator
The validator calls rev10_fun() unconditionally, but this repository does not contain a subchunk_agg_check_maxazi_rev10 definition (repo-wide search only finds this reference), so execution fails immediately with an undefined-function error. That prevents the new regression harness from running at all in the current codebase and blocks the intended rev9/rev10 comparison workflow.
Useful? React with 👍 / 👎.
| finite_mismatch_count = 0; | ||
| end | ||
|
|
||
| numeric_match = (max_abs_diff <= tol_abs) || (max_rel_diff <= tol_rel); |
There was a problem hiding this comment.
Evaluate numeric pass/fail with per-element tolerance logic
The numeric_match check uses global maxima with ||, which can incorrectly fail even when every finite element satisfies the intended (abs<=tol_abs) OR (rel<=tol_rel) rule. For example, one element can pass only relative tolerance while another passes only absolute tolerance; finite_mismatch_count is zero, but both global maxima exceed their thresholds so this expression marks the run as a failure. This can produce false regression failures and make CI results unreliable.
Useful? React with 👍 / 👎.
Motivation
subchunk_agg_check_maxazi_rev9andsubchunk_agg_check_maxazi_rev10on the exact same production inputs to detect behavioral drift.Description
validate_subchunk_agg_check_maxazi_rev9_rev10_real.mwhich exposes the exact production signature and accepts the real inputs used by the existing codebase.diff_vals,abs_diff,rel_diff,max_abs_diff,max_rel_diff,mean_abs_diff, anexact_matchviaisequaln, worst-index reporting, and a finite-element mismatch count versus tight tolerancestol_abs = 1e-10andtol_rel = 1e-10.timeit, computesspeedup = runtime_rev9 / runtime_rev10, prints a concise--- VALIDATION SUMMARY ---, returns aresultsstruct with clear fields, and raiseserror('Validation failed: rev10 does not match rev9 within tolerance.')when checks fail.Testing
subchunk_agg_check_maxazi_rev9.m, which succeeded.validate_subchunk_agg_check_maxazi_rev9_rev10_real.mto the repository, and confirmed the new file content withnl/sed.octave: command not found), so runtimetimeitexecution was not performed here.resultsstruct or raise an error on failure.Codex Task