Skip to content

test: enforce dataset route scale and subprocess failure contracts - #259

Merged
codeasier merged 1 commit into
mainfrom
test/252-failure-contracts
Oct 11, 2026
Merged

codeasier merged 1 commit into
mainfrom
test/252-failure-contracts

Conversation

@codeasier

Copy link
Copy Markdown
Owner

Summary

Adds the bounded route, deep-pagination and error-contract acceptance coverage from #252.

  • Exercise real CLI subprocess text/JSON output against typed API errors for row/byte budget exhaustion, timeout after actual scratch work, a denied second ATTACH, scratch page exhaustion and scratch-open I/O failure. Verify one error prefix, no partial payload, closed connections, removed scratch storage, unchanged source hashes and successful retry.
  • Add an independent SQL workload with 1,000,000 dynamic lifecycles, one static carry-in and 2,999,998 real events. Compare actual ATTACH and scratch execution on the same four-shard artifact; verify the eleven-shard over-limit contract, cross-shard free ownership, nonzero leak results, freed-lifetime buckets and active/include-static pagination.
  • Exercise offset 100,001 through real CLI subprocesses: non-ID ordering fails at the default row budget and succeeds with an explicit increase; ID ordering succeeds with defaults; explicit flags override environment limits in both directions.
  • Register the three exact million-scale node IDs in REQUIRED_TEST_NODES, alongside the existing installed-wheel case. Add per-node missing/wrong-file/skip/failure/error rejection tests. Ordinary PR CI keeps the nine focused cases; the million-scale cases are mandatory nightly/manual gates.

Dependency and scope

Based on #255's nightly infrastructure at 68d89670b188c93e41b1a5d8f41903057e5ada06, verified tree-equivalent to local fe86fcff7b695c9aa05e86bc87dc15d888dee4fa.

The reviewed #252 test implementations at 2a3113839709ac386d76ee73145722e09b65bd42 are unchanged. The integration only adds required-node wiring and its tests. No runtime behavior or budget defaults change.

This is partial coverage for #252. SIGKILL/SIGTERM cleanup and concurrency/concurrent-rewrite behavior remain for separate disposition. This PR makes no signal-cleanup completion claim. The installed-wheel baseline remains the existing 500,002-event test; the million-lifecycle route tests are synthetic SQLite acceptance. Clean-wheel expansion is handled separately in #250.

Validation

  • 101 focused governance, CI, runner, wheel-audit and [test][P1] 规模、路由、预算、超时与并发的端到端覆盖 #252 contract tests passed; three million-scale cases were explicitly deselected in that run.
  • Full-repository Ruff and Black checks passed; git diff --check passed.
  • Built the combined source wheel and passed the source/wheel content audit.
  • Actual generic nightly runner: 4 passed, 0 skips/failures/errors in 144.57s, on frozen local head b1fec8626996c03f0ae275a55dbe980655e08502. The summary records all four complete required node IDs and binds that source SHA to the supplied wheel SHA-256. This includes the existing installed-wheel baseline and all three million-lifecycle gates.
  • Wheel SHA-256: 76e95ddaea92e003fa7065c552ddaf748de4eb527098f6443c795c90e3f8dbcb.

Snapshot runtime provenance

Snapshot provenance decision: no-update
Snapshot provenance no-update reason: This change adds tests and CI required-node wiring only; no files under src/pt_snap_cli/snapshot/ change.

Independent review approved the unchanged test implementations: 9 new focused cases and 186 existing regressions passed (2 intentional skips). Root reviewed the required-node integration. The final local generic nightly runner completed 4 passed, zero skips/failures/errors in 144.57s, with all four exact required identities and matching source/wheel evidence. Remote CI/manual nightly execution remains pending. This branch includes #255's infrastructure commits; review/merge #255 first.

Copy link
Copy Markdown
Owner Author

Latest-head CI verification (2026-10-11): commit d279ee240af0c24d2943b6f1b6db054a22e1bd00, Test run 38146477814 completed successfully. All seven applicable jobs passed (Python 3.10–3.13, lint/format/type checks, provenance, browser regression). Python 3.13: 2674 passed, 14 skipped, 4 deselected; coverage 93.18%. Wheel audit and clean-wheel Agent acceptance passed. The separate installed-wheel dataset/nightly job was intentionally skipped on the PR event; this is not remote nightly verification. Local scale evidence in the description/earlier comments remains separate. Draft status and issue status are unchanged.

Copy link
Copy Markdown
Owner Author

检视结论:approve

对照 #252 路由/预算/深 offset:CLI 子进程错误契约;百万 lifecycle ATTACH≡scratch;深 offset + 预算优先级;3 个 million 节点进 nightly。failure + runner 定向通过。SIGKILL 清理留给 #261 文档化,可接受。

合入注意:与 #260 / #263 在 run_dataset_acceptance.py 的 REQUIRED_TEST_NODES 有硬冲突。请在 #260 之后 rebase,并把 #260 的 boundary 节点与本 PR 的 3 个 million 节点并集进 REQUIRED。不要按原建议顺序在 #260 前硬合。本评论不 approve/merge。

@codeasier codeasier left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

LGTM,已转为正式 PR。GitHub 不允许作者账号提交 APPROVE。请在 #260 之后 rebase,并集 REQUIRED_TEST_NODES。

Rebase reviewed PR259 onto current main after PR260. Union two wheel gates with all three route-million gates and preserve every fail-closed runner test. Refs #252.
@codeasier
codeasier force-pushed the test/252-failure-contracts branch from d279ee2 to 5982e43 Compare October 11, 2026 19:17

Copy link
Copy Markdown
Owner Author

按检视要求,在 #260 后将本 PR 的唯一增量提交 rebase 到实际 main 58ca23435ba9705cd941e28dab7d4bf44369bf9d。新 head 5982e43e468ec78dc8cc168120446e5b00653a36,树 74e979ac9779522d5376801816c566d214b4c7da;通过 expected-head lease 更新,未覆盖他人新提交。

仅两处 runner 冲突:REQUIRED 并集为 2 个 wheel 节点 + 3 个 route-million 节点,共 5 个;negative tests 完整并集,short-final boundary 保留。生产代码、双语文档、四分片平台工作流和独立 200-seed step 不变,三个新增 route/failure 文件与原审阅提交字节相同。

实际 main 基树和最终完整树均与已独立审阅验证的本地 preview 一致。该 preview 源 1a3962787dd78cc401953ac84c50bc6da638f926 实际 generic runner 5 passed、零跳过/错误,250.77s;wheel SHA256 aed1d6d96cc22ccc987964945f30849f5da2e18b21f13ee78a037dad49d706da。3.12/3.13 各112 focused,另44 preserved contracts;独立复核88项通过,19个测试函数为父版本并集且负例AST保留;Ruff/Black/type/audit通过。新远端 head CI 待验证。

@codeasier
codeasier merged commit 4556240 into main Oct 11, 2026
13 checks passed
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