mirror of
https://github.com/morluto/rea.git
synced 2026-11-15 19:23:24 +00:00
* fix(filesystem): close file handles only through the owned-handle owners Three sites still closed a fs/promises FileHandle in a finally block, where a failed close replaced the operation's own failure or result: the agentenv runner head read, the Linux cgroup kernel-file read and the JavaScript analysis transfer writer. They now use withOwnedFileHandle, which retains the operation outcome alongside a failed close. A lint rule, rea/no-raw-file-handle-close, refuses close() on a handle opened from fs/promises or declared as FileHandle, and fs close/closeSync on a descriptor, in src outside src/filesystem/Owned*. * fix(lint): distinguish owned handle class fields * fix(filesystem): retain diagnostic file cleanup owners * test(hopper): retry after confirmed application exit * fix(filesystem): settle doctor peers, sample cgroup outside admission, and bind lint this Desktop doctor waits for every client inspection before reporting a retained close failure. Ghidra memory cgroup sampling no longer passes the resource scope's admission gate, so a pending owner cannot mask the provider failure; failed closes are still retained for session cleanup. The raw FileHandle close rule resolves this through arrow functions only, treats static blocks as static, and keeps #name distinct from constructor parameter properties. * fix(ghidra): join in-flight cgroup samples before session cleanup ArtifactResourceScope.track runs optional work outside the admission gate while cleanup drains still join it, so a cancelled request's final retry cannot finish before a sample retains a failed close. * fix(filesystem): join work tracked during a cleanup drain and report doctor file cleanup as typed errors A cleanup retry now repeats until no tracked work is active and every retained owner has had one attempt, so diagnostic work admitted while an earlier owner is releasing is joined. Doctor reports a retained runner or configuration file close as a ProviderCleanupError bound to its lease instead of rethrowing a raw file failure, so the error document keeps the retained file. * fix(desktop): read the agentenv runner head through the artifact file owner The runner read retained a failed close under one lease while the reported failure carried another, so a successful cleanup retry left the doctor error reporting an already-closed file. withArtifactFileHandle binds one lease to both.
34 lines
1.6 KiB
JavaScript
34 lines
1.6 KiB
JavaScript
import noBufferDeepEquality from "./no-buffer-deep-equality.mjs";
|
|
import cancellationCause from "./cancellation-cause.mjs";
|
|
|
|
import noEvidenceJsonPreadmission from "./rules/no-evidence-json-preadmission.mjs";
|
|
import noFixtureRootCleanup from "./rules/no-fixture-root-cleanup.mjs";
|
|
import noPositionalToolContract from "./rules/no-positional-tool-contract.mjs";
|
|
import noSharedModuleMock from "./rules/no-shared-module-mock.mjs";
|
|
import noLocaleCompare from "./rules/no-locale-compare.mjs";
|
|
import noRawCdpSession from "./rules/no-raw-cdp-session.mjs";
|
|
import noBabelVisitorKeys from "./rules/no-babel-visitor-keys.mjs";
|
|
import projectWaitDeadline from "./rules/project-wait-deadline.mjs";
|
|
import noRawFileHandleClose from "./rules/no-raw-file-handle-close.mjs";
|
|
import providerFailureClassifier from "./rules/provider-failure-classifier.mjs";
|
|
import typedResourceRefusal from "./rules/typed-resource-refusal.mjs";
|
|
|
|
export default {
|
|
meta: { name: "rea" },
|
|
rules: {
|
|
"no-buffer-deep-equality": noBufferDeepEquality,
|
|
"cancellation-cause": cancellationCause,
|
|
"no-evidence-json-preadmission": noEvidenceJsonPreadmission,
|
|
"no-fixture-root-cleanup": noFixtureRootCleanup,
|
|
"no-positional-tool-contract": noPositionalToolContract,
|
|
"no-shared-module-mock": noSharedModuleMock,
|
|
"no-locale-compare": noLocaleCompare,
|
|
"no-raw-cdp-session": noRawCdpSession,
|
|
"no-babel-visitor-keys": noBabelVisitorKeys,
|
|
"project-wait-deadline": projectWaitDeadline,
|
|
"no-raw-file-handle-close": noRawFileHandleClose,
|
|
"provider-failure-classifier": providerFailureClassifier,
|
|
"typed-resource-refusal": typedResourceRefusal,
|
|
},
|
|
};
|