mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-04 03:57:09 +00:00
fix(verifier): tolerate out-of-range override indices
A single stale index from V8 aborted the entire override map, so any valid entries alongside it were dropped and verification ran on stale extractor values. V8 and goja register from the same bundle so a mismatch is unusual but recoverable. Skip out-of-range entries instead of erroring, and return the skipped count so the runner logs the mismatch without losing valid overrides.
This commit is contained in:
1 parent
3b204b75dc
commit
d77f89aeb1
3 files changed
+39
-17
No files matched your search
@@ -138,8 +138,13 @@ func Run(ctx context.Context, options Options) (Summary, error) {
|
||||
}); err != nil {
|
||||
return summary, fmt.Errorf("step %d push: %w", stepIndex, err)
|
||||
}
|
||||
if err := options.Verifier.OverrideExtractorValues(v8Overrides); err != nil {
|
||||
logger.Warn("v8 override apply failed", "step", stepIndex, "err", err)
|
||||
skipped, overrideErr := options.Verifier.OverrideExtractorValues(v8Overrides)
|
||||
if overrideErr != nil {
|
||||
logger.Warn("v8 override apply failed", "step", stepIndex, "err", overrideErr)
|
||||
}
|
||||
if skipped > 0 {
|
||||
logger.Warn("v8 override skipped out-of-range entries",
|
||||
"step", stepIndex, "skipped", skipped, "have", len(v8Overrides))
|
||||
}
|
||||
|
||||
screen := ""
|
||||
|
||||
Reference in new issue
Block a user