mirror of
https://github.com/morluto/rea.git
synced 2026-11-15 19:23:24 +00:00
refactor(process): own deadlines as one monotonic type with a finalize budget (#10723)
* refactor(process): own deadlines as one monotonic type with a finalize budget Deadline (src/domain/deadline) holds a monotonic work budget and a separate finalize budget that starts when finalization begins. ProviderStartupDeadline is built on it and exposes finalize(), so a failed Ghidra startup drains launcher output under its own budget and the caller's signal instead of the expired startup signal. The six wall-clock deadline sums in src move onto Deadline; a counted guard keeps the one page-clock conversion and rejects new copies. * refactor(process): share one finalize window across repeated beginFinalize calls
This commit is contained in:
1 parent
52d6725d63
commit
a67dbe07a4
15 files changed
+292
-56
No files matched your search
@@ -392,5 +392,8 @@
|
||||
"src/domain/apiContract/parseGraphqlContract.ts": 1,
|
||||
"src/javascript/analysis/JavaScriptAnalysisWorkerServer.ts": 2,
|
||||
"src/wasm/WabtFailures.ts": 1
|
||||
},
|
||||
"wall-clock-deadline": {
|
||||
"src/browser/PlaywrightScenarioRequest.ts": 1
|
||||
}
|
||||
}
|
||||
@@ -225,6 +225,18 @@ checkCounted(
|
||||
["src/domain/analysisErrorCore.ts"],
|
||||
);
|
||||
|
||||
// A deadline is a monotonic budget owned by `Deadline` in src/domain/deadline;
|
||||
// a wall-clock sum moves with clock changes and has no finalize phase. The
|
||||
// remaining copy converts a monotonic budget for a browser page, which can
|
||||
// only read its own wall clock.
|
||||
checkCounted(
|
||||
"wall-clock deadline computation (use Deadline from src/domain/deadline)",
|
||||
"wall-clock-deadline",
|
||||
files,
|
||||
/Date\.now\(\)\s*\+/gu,
|
||||
[],
|
||||
);
|
||||
|
||||
// Byte-format parsers read untrusted input. Bounds, truncation and failure
|
||||
// kind belong to BinaryReader (src/native/metadata/BinaryContainer.ts) and
|
||||
// the ParseFailure algebra (src/domain/parseFailure.ts), not to each parser.
|
||||
|
||||
Reference in new issue
Block a user