Repository navigation
refactor(ghidra): classify Ghidra file failures through the shared provider classifier - #10873
Conversation
When a capture read's tool launch was refused with EPERM, pcap reported it as unreadable tool output (AnalysisProtocolError) instead of an unavailable tool. Pcap also never told "not executable" apart from "missing". Add classifyLaunchFailure in src/process as the one owner of which spawn errnos mean missing (ENOENT, ENOTDIR) and which mean present but not executable (EACCES, EPERM, ENOEXEC, EISDIR). Pcap, apktool and gdb used three different errno lists; all three now use it.
Add ProviderOutcome, read once from the supervisor's facts, and classifyProviderOutcome, the one mapping from an outcome to a typed error. Migrate pcap and the shared artifact producer command failure (TShark, sigrok). Add the rea/provider-failure-classifier lint rule with a shrink-only baseline of per-site (cause: unknown) => AnalysisError functions.
…red owner (#10598) The Ghidra and JADX Java probes and adb's version probe now take missing-versus-not-executable from classifyLaunchFailure instead of their own errno checks. ELOOP and ENAMETOOLONG join the owner's missing set, so adb keeps its existing classification and both Java probes now treat a non-directory path component as a missing runtime.
…ol exits unsuccessfully
Add ProviderOutcome, read once from the supervisor's facts, and classifyProviderOutcome, the one mapping from an outcome to a typed error. Migrate pcap and the shared artifact producer command failure (TShark, sigrok). Add the rea/provider-failure-classifier lint rule with a shrink-only baseline of per-site (cause: unknown) => AnalysisError functions.
…nto HEAD # Conflicts: # src/pcap/PcapCommand.ts
… a target refusal The supervisor now watches for a managed runtime's out-of-memory report while output streams (JVM java.lang.OutOfMemoryError, V8 'JavaScript heap out of memory'), so a retention budget cannot hide it. ProviderOutcome gains a runtime-exhausted kind and classifyProviderOutcome maps it once. Apktool decode opts in and moves to the shared classifier; Ghidra's single-purpose output token becomes the JVM runtime option and its area matching reuses the shared table.
…HEAD # Conflicts: # src/pcap/PcapCommand.ts # tests/evaluation/providerFailureClassifierRule.test.ts
…nto refactor/provider-outcome # Conflicts: # src/pcap/PcapCommand.ts
…fix/streaming-runtime-exhaustion
Name the executable on errnos Node throws synchronously from spawn (ENOEXEC, ENOTDIR, ...) and read the Windows native launcher's executable-launch constraint, so pcap attributes those refusals to the selected tool or limiter instead of an unknown stage.
…nto w5/provider-outcome # Conflicts: # src/pcap/PcapCommand.ts
…t retained stderr (#10724) The SQLite worker and the Node capture decoders now declare runtime: "v8", so the supervisor observes V8's heap report as output streams. Both classifiers read the runtime-exhausted outcome instead of matching retained stderr, so a report beyond the retention budget, or one whose process then overflowed its output budget, is still reported as memory exhaustion.
# Conflicts: # .oxlintrc.json # scripts/lint/index.mjs # src/pcap/PcapCommand.ts
…vider classifier (#10716) * refactor(evm): classify EVMole worker outcomes through the shared provider classifier The EVMole worker's cancellation, deadline, output budget and CPU/file-size signals now go through classifyProviderOutcome; only the prlimit launch refusal and the reserved EFBIG exit remain in its dialect. The worker is opted into V8 exhaustion scanning so a heap report names its fixed 256 MiB heap. providerOutcomeOf now reads a launch refusal only from a spawn errno, so a private-storage or carrier read errno is no longer reported as a limiter launch failure. * fix(evm): keep a stream failure's exit status and update Linux worker expectations * refactor(process): read launch refusals through the launcher identity owner * refactor(wasm): classify WABT command outcomes through the shared provider classifier (#10727) * refactor(wasm): classify WABT command outcomes through the shared provider classifier WABT's cancellation, command deadline, output budget, and inherited-limit signals now go through classifyProviderOutcome; its dialect keeps only the configuration-probe and launch-refusal unavailability and the unclassified-exit output error. A tool ended by SIGXCPU/SIGXFSZ or the memory limit is now a resource constraint instead of an output error, and a refused launch in the producer phase is reported as unavailable. The shared timeout context gains the analysis setting that selected the deadline, and the output-limit context may name its exceeded budget. * fix(wasm): keep setup guidance when a WABT version probe's output cannot be collected
…w5-10634 # Conflicts: # src/apktool/ApktoolProvider.ts # src/ghidra/GhidraDiagnostics.ts
…d the carried caller reason
…lassifier baseline
…nto refactor/ghidra-file-classifier Port main's browser application_already_running classification into the error catalogue and its CSV, and let Hopper's request queue fail requests with the bridge reply-ceiling refusal (#10699) as well as Hopper errors.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…nto refactor/ghidra-file-classifier Keep main's non-zero exit limitation beside the structured refusal limitation; keep the generated error catalogue (the ProcessCli recovery test checks the exported remediation only); share one Linux host stub in the EVM cleanup test so the new cancellation test stays within the process.platform baseline.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…plit the guard baselines Hopper presentation stays on HopperErrors.ownPresentation (main's #11135 typing of the same guidance is superseded by that owner).
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
2 similar comments
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
aa97567 to
1aff82d
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@greptileai review — please review the latest commit (merge of current main). |
Main moved launch failures out of the provider dialect: the shared classifier reports them (classifyLaunchFailure) and a provider supplies launchUnavailable, and ProviderOutcomeContext gained providerId. This branch gave the dialect an unclassified report. Merged: - ProviderDialectOutcome is exited | protocol, so the examined outcome drops launch_refusal_code and the launch-refused failure_kind, and the classifier test drops its launch-refusal case. - The unclassified report takes only provider facts; it reports under the context's providerId instead of a second copy of it at each call site. - Apktool, EVMole, pwntools, pcap and WABT keep main's launchUnavailable and use the unclassified report for unrecognised exits and stream failures. - SQLite's worker deadline keeps main's worker_timeout_ms limit and drops the CLI spelling from its remediation; the unclassified diagnostics read errorMessage. - Ghidra file reads keep the shared dialect with main's sha256Hex and errorMessage owners. - docs/user-visible-errors.csv stays the generated catalogue (regenerated from the merged table; unchanged).
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
# Conflicts: # scripts/verify/architecture-guards.mjs
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@greptileai review the latest commit (916af34): merged main, where launch failures moved to the shared classifyLaunchFailure; the unclassified report now binds to the context's providerId. |
|
---------- Forwarded message ---------
From: chatgpt-codex-connector[bot] ***@***.***>
Date: Sun, Nov 15, 2026, 9:30 PM
Subject: Re: [morluto/rea] refactor(ghidra): classify Ghidra file failures
through the shared provider classifier (PR #10873)
To: morluto/rea ***@***.***>
Cc: Subscribed ***@***.***>
*chatgpt-codex-connector[bot]* left a comment (morluto/rea#10873)
<#10873 (comment)>
You have reached your Codex usage limits for code reviews. You can see your
limits in the Codex usage dashboard
<https://chatgpt.com/codex/cloud/settings/usage>.
—
Reply to this email directly, view it on GitHub
<#10873?email_source=notifications&email_token=CURDWJK5IXQWJFX6R3BSOS35ZJRCRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMOJQGU3DGNZVHAYKM4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSWGM33PORSXEX3DNRUWG2Y#issuecomment-6905637580>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/CURDWJI4GLN54PXOAP3VV3D5ZJRCRAVCNFSNUABGKJSXA33TNF2G64TZHMYTEMBZHE3DMOJTGM5US43TOVSTWNRUGAYTIMRTGYYTPILWAI>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/CURDWJPGNG6S6EH5UI2NJBL5ZJRCRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMOJQGU3DGNZVHAYKM4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSVGM33PORSXEX3JN5ZQ>
and Android
<https://github.com/notifications/mobile/android/CURDWJODO73ZGAIVUEJLXND5ZJRCRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMOJQGU3DGNZVHAYKM4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSXGM33PORSXEX3BNZSHE33JMQ>.
Download it today!
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
The next Ghidra slice of W5c.
ghidraFileFailure(cause, operation, diagnostics)(15 call sites) becomesghidraFileDialect(operation, diagnostics)for the sharedclassifyProviderFailure. Therea/provider-failure-classifierbaseline dropssrc/ghidra/GhidraFileArtifacts.ts(1 → 0).Built on #10872 (merged), which lets the shared owner carry Ghidra's file diagnostics on a cancelled read. Refs #10482.
Collapsed stack
The stack above this PR has been squash-collapsed into this branch, so merging it also lands these reviewed PRs (none is breaking):
Problem and expected behavior
ghidraFileFailurere-derived typed pass-through and reader cancellation beside the shared owner. Expected: Ghidra supplies only its own meaning (file capacity, changed file and access refusal mapped inside the file's cleanup wrapper, composed with any unresolved cleanup; the admission/system-code adapter report that keeps the cleanup), and the shared owner reports pass-through and cancellation with Ghidra's diagnostics.Change and scope
ghidraPhysicalFailure(typedunknown → unknown, the existing inner mapper) andghidraFileDialectwithdiagnostics,recognise(typed primary, composed with the file's cleanup exactly as before) andunclassified(the adapter report with the cleanup attached, as before).GhidraCheckpoint,GhidraAnalysisSeeds,GhidraExtensions,GhidraExecutableHeader,GhidraInstallationProperties,GhidraProjectSnapshot,GhidraProviderand the boundary test callclassifyProviderFailure(cause, ghidraFileDialect(...)).Not included:
GhidraClient#cleanupErrorand Ghidra's remote-code mapping inGhidraSessionError/GhidraProviderClient, which are the next slices.Dropped audit rows in
docs/user-visible-errors.csvThis PR replaces main's hand-written copy audit (112 rows at 5d3e1dc, last edited by #11511; #11101 edited row 67) with the generated catalogue (#10508 option 3). Each dropped row was checked against the generator output and the source on this head (script over every row; source-derived, not a runtime check):
src/domain/errors.ts,UnknownRegistryError): all 22 tags are in the generated catalogue with their code, category and default retryability, now split per reason/constraint.removed, and the removed approval-based unknown tracking). No current fact.install.sh, MCP transport, process CLI, Ghidra, Windows loader, views). Their wording is owned by the named source module, not by the generator: 47 rows match source verbatim and 18 match as templates (shell variables,{placeholders}). Of the other 16, 9 record a description of the change rather than wording, and 5 had already drifted from source (for example rows 64/74 "Install Node.js 22.x …" no longer exist inDoctorDiagnostics/SetupHost; row 105's installer mismatch now adds a recovery). This includes fix(process): give process-command failures their own recovery instead of doctor #11101's row 67 (verbatim insrc/application/process/ProcessCli.ts) and refactor(mcp): bind analysis settings and session-derived comparison tools through the shared binding table #11511's location moves (rows 24.93 and 71, nowFunctionComparisonEvidence.tsand a removed guard).src/main/messages.tsconstants are asserted bytests/boundary/mcp/mainErrors.test.ts);src/main/messages.test.ts, which only checked that those constants were copied into the CSV, is removed. The review annotations are history and remain in git at 5d3e1dc. No audit fact is moved into the generator, because none is an error-contract fact the generator's source owns.Contract and boundary impact
classifyProviderFailurewith the Ghidra file dialect.Evidence and regression coverage
tests/boundary/providers/ghidra/ghidraFileFailure.test.tspins the opaque, errno and authored cleanup cases, and the other suites below pin the callers.Validation performed
npm run check:fast: pass.npm run test:focused --withsrc/ghidra/GhidraAnalysisSeeds.test.ts,src/ghidra/GhidraProvider.behavior.test.ts,src/ghidra/GhidraCheckpoint.test.ts,src/ghidra/extensions/GhidraExtensions.test.ts,tests/boundary/providers/ghidra/{ghidraCheckpointLifecycle,ghidraFileFailure,ghidraProjectSnapshot}.test.ts,tests/boundary/filesystem/{ghidraInstallationProperties,ghidraPspExtension,ghidraProfileArtifactOwnership,ghidraExecutableHeader}.test.ts,tests/boundary/il2cpp/il2cppGhidraSeeds.test.ts,tests/process-global/ghidraProjectReadCancellation.test.ts,tests/evaluation/providerFailureClassifierRule.test.ts,src/providers/classifyProviderFailure.test.ts: 15 files, 517 passed.main(merge 1aff82d). Conflicts resolved at the owner: kept main's moves (src/ports,src/resources,src/cli/cliJsonInput.ts,capturedProviderOutput,analysisErrorProjectionSchema, simulated-host EVM tests, refactor(kuna): decide Kuna readiness once for doctor and runtime #10997's Kuna readiness, refactor(javascript): name heap and deadline flags from the bound limit, not remediation text #11448'smax_heap_mblimit and adapter-neutral heap remediation) and re-applied this stack on top (isAbortOfin the moved JSON input readers, the Hopper error move in new importers, the Kuna installation dialect, the SQLite worker dialect, the streamed V8 exhaustion report beside refactor(javascript): name heap and deadline flags from the bound limit, not remediation text #11448's limit in both JavaScript workers and their tests, the new EVM abort-owner test onSIMULATED_LINUX_X64). The merge commit was written without the pre-commit lint-staged pass, which otherwise rewrote ~40 unrelated files from main; the pre-push hook ran. After the merge:npm run check:fast(typecheck, lint, architecture guards) pass;node scripts/verify-module-boundaries.mjspass;npm run docs:error-schemaleavesdocs/user-visible-errors.csvunchanged;npx oxfmton the resolved files;npm run test:focused --withsrc/domain/analysisErrorProjection.test.ts,src/hopper/HopperErrorProjection.test.ts,src/process/OwnedLease.test.ts,src/sqlite/SqliteDatabaseFailures.test.ts,src/browser/WebBundleAnalysisWorker.test.tsandtests/boundary/{javascript/workerOrderAudit,evm/evmCleanupRetry,filesystem/cliJsonInput,pcap/pcapCommand,pcap/pcapCredentialErrors,providers/ghidra/ghidraFileFailure,providers/kuna/kunaHashOwnerPropagation,sqlite/sqliteDatabaseFailures}.test.ts: 13 files, 353 passed, 2 skipped. On the previous merge of the same resolutions,src/process/{RuntimeExhaustion,SignalAbort}.test.tsandtests/boundary/{process/binarySessionCleanupRetry,providers/hopper/linuxPrivateDisplay}.test.tsalso passed.Merged main at 465796a (head b992171). Main moved launch failures out of the provider dialect (
classifyLaunchFailure,launchUnavailable) and addedproviderIdto the outcome context, so: the dialect outcome isexited | protocoland the examined outcome dropslaunch_refusal_code; theunclassifiedreport now takes only provider facts and reports undercontext.providerId; Apktool, EVMole, pwntools, pcap and WABT keep main'slaunchUnavailable; SQLite keeps main'sworker_timeout_mslimit; Ghidra keepssha256Hex/errorMessagefromsrc/kernel.docs/user-visible-errors.csvstays the generated catalogue from #11060; see "Dropped audit rows" below.npx tsc --noEmit -p .— passed;npm run check:fastand pre-push hook — passed;node scripts/verify/architecture-guards.mjsandnode scripts/verify-module-boundaries.mjs— passed.npm run build:cachedthennode scripts/generate-error-schema.mjs --check— fresh.npm run test:focused -- <12 owner tests: classifyProviderOutcome, SqliteDatabaseFailures, WabtFailures, EvmoleFailures, ApktoolCommandRecovery, ApktoolProvider, PwntoolsFailures, IdaBusyHealth, analysisErrorProjection, PcapNativeBound, processCliFileInput, hopperClient.cleanupRetry>— 330 passed.npm run test:focused -- <8 boundary tests: pcapCredentialErrors, pcapCommand, kunaHashOwnerPropagation, ghidraFileFailure, ghidraInstallationProperties, ghidraExecutableHeader, providerOutcome, artifactSelectedCommand>— 99 passed, 2 skipped.Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.