Skip to content

Tighten nightly and weekly result checks - #303

Open
anle2024 wants to merge 3 commits into
mainfrom
codex/tighten-scale-result-checks
Open

anle2024 wants to merge 3 commits into
mainfrom
codex/tighten-scale-result-checks

Conversation

@anle2024

@anle2024 anle2024 commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Supersedes #302.

Require every configured validation and test metric before accepting a fitted result or reference. Compare each prediction with the sampled input population, record requested/scored/skipped counts measured from each output, and reject unexpected skips. A population error names the failing prediction. A reference without the configured metrics fails before ingest.

Resolve forecast coordinates from the scoring snapshot metadata. The requested anchors and the output coordinates use one rule. The requested-to-output comparison uses timestamp values, so nanosecond input and microsecond output storage match.

The four-file patch has 163 additions and 20 deletions, including an 87-line regression test file.

Change map

File-by-file change map.

Testing Done

  • 34 repository CPU checks passed on pandas 3.1.1 and pandas 2.3.3: python -m pytest -q -c /dev/null --confcutdir=test/scripts -p no:cacheprovider test/scripts/test_engine_e2e_case_results.py test/scripts/test_engine_e2e_case_hardware.py.
  • The OSS Readiness test list passed 189 tests with pandas 3.1.1 and no PyArrow. test_history_scan_explicitly_selects_all_commits failed because the local checkout is shallow.
  • CPU runs of the runner on tiny binary, multiclass, temporal_link and static_link graphs passed. Each run recorded 20/20/0 counts for the first, repeat and reload predictions. A binary run with a failed reload manifest write also passed. A binary run with a stale reference failed before ingest with Missing or non-finite reference metrics, and a run with a matching reference passed.
  • The retained 117-case suite from the larger earlier patch passed 102 cases after one call-site update and one message update. The other 15 cases expect behavior that this patch removes on purpose. Twelve cases read copied manifest counts. Three cases accept different timestamp units between runs on pandas 2.3.3.
  • Flake8, isort and git diff --check passed.

GPU training and the full scale campaign were not rerun.

@copy-pr-bot

copy-pr-bot Bot commented Nov 11, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@anle2024
anle2024 temporarily deployed to gha-kumo-workflow-tests November 11, 2026 00:11 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The engine case helpers now validate configured validation and test metrics, prediction counts, and task-specific prediction coordinates against the requested population. The changes add end-to-end tests for metric and population checks, and add the test module to the OSS readiness workflow.

Sequence Diagram(s)

sequenceDiagram
  participant run
  participant prediction_table
  participant prediction
  participant check_predictions
  run->>prediction_table: derive requested rows and task-specific coordinates
  prediction_table-->>run: return requested rows and coordinates
  run->>prediction: generate predictions and record population counts
  prediction-->>run: return prediction results
  run->>check_predictions: check repeated and reloaded predictions against requested rows and coordinates
Loading
Merge Risk: Minimal · up to 6c78b

The change tightens result checks; no merge-blocking risk was established.

Security architecture risk: Low · up to df833

The changes strengthen test-result validation without adding a network entrypoint, privileges, or a new data-access path. No introduced security concern was substantiated. Assurance remains bounded because full training runs were not repeated and security coverage is incomplete.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed behavior is reachable through existing case scripts and local regression tests. Comparing base and head shows validation changes around existing snapshot, local input-file, model-prediction, and output paths, rather than an expansion of caller authority or a new sensitive sink.

Trust Boundaries and Controls

  • observed — The added controls bind prediction acceptance to held-out input identities, reject skipped input populations, and require configured finite validation/test metrics before acceptance. Forecast coordinate selection uses the scoring snapshot metadata rather than inferring the time field solely from returned columns.

Resilience and Maintainability Implications

  • observed — Failure remains the default result state. The exception/finally path records failure, restores signal handling, stops the observer, writes the result, and attempts temporary-directory cleanup. Direct result writing is non-atomic in both base and head; this is a pre-existing runner limitation, not a regression introduced by the validation changes.
Pre-merge checks: Passed 2 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Change Map Design Review Inconclusive The marked PR conversation comment and linked problem are unavailable. The PR description links to the change map but does not include its contents. The diff contains 163 additions and 20 deletions, a… Provide the conversation comment starting with <!-- kumo-pr-change-map --> and the linked problem or release requirement. Review them against the diff and existing code.
Passed Passed checks: 2 passed

Check name Status Explanation
Pr Size Passed The pull request changes 4 files. The limit is 40 files.
Public Resource Access Passed The changed lines add no external resource references. The added file paths refer to files in this repository.
Full details: Change Map Design Review

Explanation

The marked PR conversation comment and linked problem are unavailable. The PR description links to the change map but does not include its contents. The diff contains 163 additions and 20 deletions, and the repository template requires the marked comment. These sources do not establish the comment's design rationale or stopping condition.

Resolution

Provide the conversation comment starting with &lt;!-- kumo-pr-change-map --&gt; and the linked problem or release requirement. Review them against the diff and existing code.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between df833ef and 6c78b57.

Files selected for processing: 3

  • packages/kumo-engine/test/cases/README.md
  • packages/kumo-engine/test/cases/common.py
  • test/scripts/test_engine_e2e_case_results.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.

@anle2024

anle2024 commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

Change map

Before this patch, the runner did not reject a missing test metric. It also did not reject three identical outputs that each omitted the same requested input. Its fixed forecast keys also omitted the entity's configured time column.

File Function / scope What changed Why
packages/kumo-engine/test/cases/common.py prediction_table, check_metrics, check_population, prediction_coordinates, check_predictions, run Retain sampled input keys from the coordinate rule. Require configured validation/test metrics, and check references before ingest. Count each output's population and check its coordinates. Resolve the forecast clock from metadata. Reject incomplete results before pass status or reference publication. Compare requested and output timestamp values across storage units.
test/scripts/test_engine_e2e_case_results.py Metric, population and coordinate regressions Add five compact CPU cases, including missing rows, foreign rows, measured counts, task coordinate rules, reordered forecasts and timestamp precision. Reproduce the three gaps without GPU or cloud dependencies.
.github/workflows/oss-readiness.yml Repository CPU checks Include the new regression file. Run these guards in existing PR CI.
packages/kumo-engine/test/cases/README.md Result acceptance contract Document required metrics, complete sampled populations, measured counts, zero skips and forecast coordinates. Make the stricter reference and candidate checks clear.

Verification: 34 repository CPU checks passed on pandas 3.1.1 and 2.3.3. CPU runner runs passed for binary, multiclass, temporal_link and static_link. A stale reference failed before ingest. Flake8, isort and whitespace checks passed. The description records the retained-suite results and one existing shallow-history failure.

Scope ends at these shared runner guards and focused regressions. Training budgets, learning thresholds and prediction tolerances stay unchanged.

@anle2024
anle2024 marked this pull request as ready for review November 11, 2026 00:12

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nitpick comments: 2

packages/kumo-engine/test/cases/common.py: 2

340-342: Trivial · Performance & Scalability · Low value

Timestamp comparison does not match the comment.

The comment says the code compares timestamp values across ns/us storage units. The code compares Index.tolist() values. Pandas Timestamp objects compare equal across units, so this likely works. Mixed-unit MultiIndex levels may behave differently when sort_index() runs. A us frame and an ns frame could sort differently if a level contains mixed types.

The test at lines 68-69 exercises this path with a MultiIndex. Confirm that it passes on the pinned pandas 3.x. If it passes, no change is needed.

Also, tolist() on a large MultiIndex builds a Python tuple list. This can use large amounts of memory for large prediction populations. Consider a vectorized comparison.


275-282: Trivial · Functional Correctness · Low value

check_metrics has a wrong error message and an unreachable guard.

The error lists only invalid names. Missing and non-finite names are mixed. This is acceptable. But not required or not metrics makes an empty configured_metrics list raise with an empty list as detail. That message gives no cause.

Also, math.isfinite(value) raises TypeError for non-numeric values. Reference JSON could contain null. That raises TypeError, not ValueError.

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 8b4942f and f90e9f7.

Files selected for processing: 4

  • .github/workflows/oss-readiness.yml
  • packages/kumo-engine/test/cases/README.md
  • packages/kumo-engine/test/cases/common.py
  • test/scripts/test_engine_e2e_case_results.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.

Count requested, scored and skipped anchors from each prediction frame.
Engine manifests copy the shared input table counts, and the engine
writes them on a best-effort basis. A population error now names the
failing prediction and gives its counts. DataFrame inputs work again.

Derive the requested anchors and the extra output fields from
prediction_coordinates. One rule now controls the static_link anchor.
CPU tests cover the binary, link and static_link coordinate rules.

Restore the index comparison between runs. All three runs read the same
microsecond output files. The requested-to-output check still compares
nanosecond and microsecond timestamps by value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@anle2024
anle2024 deployed to gha-kumo-workflow-tests November 11, 2026 06:14 — with GitHub Actions Active

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Additional comments: 1

test/scripts/test_engine_e2e_case_results.py: 1

63-63: Trivial · Maintainability & Code Quality · Quick win

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

The unit test does not cover mixed ns and us units across outputs.

All three frames use microseconds here, and the requested table uses nanoseconds. The test shows that population matching is value-based. It does not show that two outputs in different units pass the index.equals check in check_predictions. Add one case with one output in ns and one in us.

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f90e9f7 and df833ef.

Files selected for processing: 3

  • packages/kumo-engine/test/cases/README.md
  • packages/kumo-engine/test/cases/common.py
  • test/scripts/test_engine_e2e_case_results.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

Every case passes its metrics through overrides, so the runner can check
the reference right after it loads it. A stale reference now fails in
seconds, before ingest and training-table generation. The error names
the reference instead of training. A case without metric overrides
still fails at the end-of-run reference comparison.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@anle2024
anle2024 deployed to gha-kumo-workflow-tests November 11, 2026 06:25 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
gha-kumo-workflow-tests — 6c78b577 Deployed Nov 11, 2026 by anle2024 via import #2056
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