Lower the per-translation wall-clock ceiling from 30s to 20s
The hard end-to-end ceiling per translation attempt is now 20 seconds, in the corpus-triage worker guard that enforces it and in the AGENTS.md and docs/VALIDATION.md statements of the contract. The 500-MiB memory budget is unchanged. Verified: corpus-triage unit tests (15) pass; fmt clean.
This commit is contained in:
1 parent
91a5e83f75
commit
7154e84d2c
3 files changed
+8
-8
No files matched your search
@@ -128,7 +128,7 @@ fixes over one-off workarounds.
|
||||
|
||||
### Translation performance is a correctness contract
|
||||
|
||||
- **30 seconds is a hard end-to-end ceiling per translation attempt.** Measure from handing the
|
||||
- **20 seconds is a hard end-to-end ceiling per translation attempt.** Measure from handing the
|
||||
selected AIR input to an isolated worker through translation, SPIR-V validation, and reporting
|
||||
the result. Success or an honest unsupported-input `FALLBACK` must arrive within the ceiling;
|
||||
exceeding it, timing out, or killing a stuck worker is a failing result that must be diagnosed
|
||||
@@ -161,7 +161,7 @@ fixes over one-off workarounds.
|
||||
slowest row and the scope measured. Debug-build timing does not verify the ceiling.
|
||||
- When a slow or memory-heavy failure class is found, add a deterministic regression check for
|
||||
the underlying redundant-work or boundedness property. Avoid machine-fragile microbenchmarks;
|
||||
keep the 30-second and 500-MiB worker guards as hard integration backstops.
|
||||
keep the 20-second and 500-MiB worker guards as hard integration backstops.
|
||||
- **Do not normalize known breaches.** An observed over-budget translation is an active correctness
|
||||
bug, not acceptable technical debt or a reason to weaken the workload. Profile where its time
|
||||
and memory go, remove redundant or global work structurally, and remeasure the same input under
|
||||
@@ -262,6 +262,6 @@ When diagnosing a hang, prefer reading full `cargo test` output over piping thro
|
||||
when fmt, clippy, and applicable Rustdoc checks are clean.
|
||||
|
||||
**Done** = it works under the checks above, claims match evidence, fmt/clippy/Rustdoc are green,
|
||||
measured translations in the touched scope stay within 30 seconds and 500 MiB, relevant capability
|
||||
measured translations in the touched scope stay within 20 seconds and 500 MiB, relevant capability
|
||||
audits remain closed without stale evidence or unrelated source reads, and the tree stays
|
||||
publishable as a general AIR→SPIR-V translator.
|
||||
+3
-3
@@ -157,7 +157,7 @@ cargo run --release -p metal2vulkan-validation --bin corpus-triage -- \
|
||||
|
||||
The 500-row checkpoint is the measured default for the current 88,820-row corpus: unlike a
|
||||
1,000-row checkpoint containing several of its largest modules, it retained comfortable margin
|
||||
under the repository's 30-second workflow ceiling while still persisting every ten completions.
|
||||
under the repository's 20-second workflow ceiling while still persisting every ten completions.
|
||||
Jobs default to the host's available logical cores (`nproc`). Explicitly increasing that value
|
||||
beyond the available cores can starve individual workers and create false timeouts.
|
||||
|
||||
@@ -166,7 +166,7 @@ when lowering `air.get_num_samples.i32`; authored candidate execution uses that
|
||||
not a product default: general callers provide their exact raster sample count through
|
||||
`TransformOptions` or the CLI.
|
||||
|
||||
Each translation runs in a killable child with a 30-second / 500-MiB ceiling. The parent owns the
|
||||
Each translation runs in a killable child with a 20-second / 500-MiB ceiling. The parent owns the
|
||||
child's scratch subtree, so success, failure, timeout, and memory termination all have the same
|
||||
deterministic cleanup path; a killed child never strands a PID-named directory. Completed results
|
||||
cross a queue bounded by the requested worker count. If a ten-row SQLite checkpoint fails, the
|
||||
@@ -210,7 +210,7 @@ translation cannot drift into separate whole-symbol allowlists.
|
||||
|
||||
Focused audits select cached structural facts, not unsupported-requirement rows. A feature therefore
|
||||
remains auditable after it becomes fully supported. Device-address captures use the same cursor and
|
||||
the same killable 30-second / 500-MiB translation worker as the full census:
|
||||
the same killable 20-second / 500-MiB translation worker as the full census:
|
||||
|
||||
```sh
|
||||
cargo run --release -p metal2vulkan-validation --bin corpus-triage -- \
|
||||
|
||||
@@ -22,7 +22,7 @@ use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
|
||||
use std::sync::{mpsc, Arc, Barrier, Mutex};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
const TRANSLATION_TIMEOUT: Duration = Duration::from_secs(30);
|
||||
const TRANSLATION_TIMEOUT: Duration = Duration::from_secs(20);
|
||||
const TRANSLATION_MEMORY_LIMIT_BYTES: u64 = 500 * 1024 * 1024;
|
||||
const LARGE_TRANSLATION_SOURCE_BYTES: usize = 256 * 1024;
|
||||
const MAX_LARGE_TRANSLATION_JOBS: usize = 2;
|
||||
@@ -2194,7 +2194,7 @@ declare i32 @linked.MTL_VISIBLE_FN_REF() section "air.externally_defined"
|
||||
fn timeout_shape_excludes_bounded_phase_diagnostics() {
|
||||
assert_eq!(
|
||||
normalize_failure_shape(
|
||||
"translation timeout after 30 seconds: [retry-debug] passes: cfg repair start"
|
||||
"translation timeout after 20 seconds: [retry-debug] passes: cfg repair start"
|
||||
),
|
||||
"translation timeout after # seconds"
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user