Repository navigation
feat(errors): project fixed native and producer input allowances as typed refusals - #11623
Merged
Merged
Conversation
…yped refusals
fixedNativeAllowance wrote its allowance and value only into the remediation
sentence, and fixedProducerInputAllowance put the byte count into the
allowance name. Both now build fixedAllowanceOptions with limit and unit, so
the native command output capture, PE resource metadata, Ghidra
installation-properties and artifact analysis input refusals project
details.refusal {kind: fixed_ceiling, allowance_kind, limit, unit}. The
fixed-ceiling remediation renders the value from those facts for every
ceiling that carries them.
Refs #10508
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
[Medium impact] The reviewed changes appear safe to merge. SummaryFixed native and producer input allowances now carry numeric facts under
Reviews (2) · Last reviewed commit: "test(errors): check the rendered allowan..." · Reviewed by Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refs #10508 ("fixed allowances not projected", first slice). Fixed native and producer input allowances now project as
details.refusal(kind: "fixed_ceiling",allowance_kind,limit,unit) instead of carrying their value only in prose.Problem and expected behavior
fixedNativeAllowance(native command output capture allowance, PE resource metadata allowance) returned only aremediationActionsentence with the value in text, so the error had nofixedAllowanceand nodetails.refusal.fixedProducerInputAllowance(Ghidra installation properties, artifact analysis input) did setfixedAllowance, but wrote the byte count into the allowance name ("... of 1048576 bytes (this release has no runtime override)") instead oflimit/unit. Tests matched those sentences. Expected: the shared ownerfixedAllowanceOptionscarries the value as facts, and prose is rendered from them.Change and scope
fixedNativeAllowance(allowance, kind, limit, unit)returnsfixedAllowanceOptions(allowance, kind, {limit, unit}); its two callers pass the numeric constants.fixedProducerInputAllowance(bytes, allowance)passes{limit: bytes, unit: "bytes"}and keeps the plain name.analysisRefusalRemediation(fixed ceiling) appends "The allowance is {limit} {unit}; this release has no runtime override." when the ceiling carries both, so every ceiling with facts (9 existing sites) states its value without restating it in the name.details.refusalinstead of sentences; the NTFS test keeps the owner's sentence as a prefix (toContain);analysisRefusal.test.tsasserts the rendered value sentence.fixedAllowanceRemediationdirectly into a message (DenoStandaloneArtifactReader.ts:657,deno/DenoSectionLayout.ts:378,530,deno/DenoVirtualFs.ts:502,511,520);artifactFixedLimitFailure(src/resources/ArtifactReader.ts:449, 6 callers) whoseArtifactReaderFailure("limit")carries prose only; and about 47fixedAllowanceOptionscalls that pass nolimit.Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.
Contract and boundary impact
src/domain/fixedAllowanceRemediation.ts(fixedAllowanceOptions) andsrc/domain/analysisRefusal.ts(rendering);fixedNativeAllowanceinsrc/domain/native/nativeDeadlines.tsnow delegates to the owner.details.refusal; the two producer-input ones gainlimit/unitin it. Remediation wording for fixed ceilings with facts gains one sentence; the allowance name for producer input allowances no longer embeds the byte count.docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; edit authored instructions in.agents/skills/reverse-engineer-anything/and never commit build outputs): None;docs:check(including the generated error schema) passes unchanged.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
src/native/pe/PeResourcesProvider.test.ts,tests/boundary/filesystem/ghidraInstallationProperties.test.ts,src/application/ntfs/NtfsJournalService.test.ts,src/domain/analysisRefusal.test.ts.limit/unitunderdetails.refusal(PE has nodetails.refusalat all), so the new assertions fail there.details.refusal: {kind: "fixed_ceiling", operation: "inspect_pe_resources", allowance: "The PE resource metadata allowance", allowance_kind: "parser", limit: 8388608, unit: "bytes"}.For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.
For evidence-bearing changes:
Validation performed
npm run test:focused --analysisRefusal, NtfsJournalService, kunaProvider, PeResourcesProvider, ghidraInstallationProperties, NativeCommandAnalysisError, ArtifactAnalysisResources: 111 passed after updating the NTFS assertion (it failed once on the exact-equality sentence).npm run test:focused --analysisRefusal, fixedAllowanceRemediation, nativeExports, binaryDiagnosticsMcp, WakaruReport: 47 passed.npm run check:fast,npm run docs:check: passed. Pre-commit and pre-push hooks ran.128 levelsinstead of the sentence;npm run test:local -- src/domain/analysisRefusal.test.ts: 12 passed.Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.