Repository navigation
feat(gpu)!: add per-call object, work, report, metadata, structure, and parser budgets to inspect_gpu_code_objects - #14882
Conversation
…nd parser budgets to inspect_gpu_code_objects Replace the pending GPU object and parser ceilings in GpuCodeObjectsProvider with domain-owned optional per-call parameters (max_object_bytes, max_work_bytes, max_report_bytes, max_metadata_bytes, max_structure_bytes, max_parser_entries, max_parser_visits, and max_token_bytes) reporting details.limit and adjustable_budget, remove superseded hardcoded constants, and register only the recursive container and AMDGPU MessagePack nesting caps as a fixed representation allowance. BREAKING CHANGE: inspect_gpu_code_objects adds optional per-call budget parameters and reports details.limit with details.refusal.kind "adjustable_budget" instead of "fixed_ceiling" on top-level object, work, report, metadata, structure, and parser budget refusals.
[Medium impact] The PR appears safe to merge; both prior findings are fixed and no new blocking issue was found. SummaryAdds eight per-call budgets to
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[CLI or MCP request] --> B[Resolve caller budgets and defaults]
B --> C[Inspect GPU objects]
C --> D{Budget exceeded?}
D -->|No| E[Return observations]
D -->|Report or top-level limit| F[Return typed resource refusal]
D -->|Individual object limit| G[Mark object capacity and retain siblings]
G --> E
F --> H[Keep partial byte needs separate from required_value]
Reviews (6) · Last reviewed commit: "fix(gpu): report lower-bound report byte..." · Reviewed by Greptile |
… and keep max_work_bytes at 512 MiB
…fore refill, and admit floats under small token budgets
Codex Review Summary: ✅ CompletedThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 937081dc0b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…dget, and keep 128-token PTX limit
…couple non-GPU recognition, and align frame/recovery bounds
…fill/readBounded regressions
…s, forward CUDA cancel signal, and report max_report_bytes required_value
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a855caa517
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…rce max_token_bytes on recognized PTX headers
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 00e8705aa2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const directory = await readGpuNativeDirectory( | ||
| source, | ||
| elf | ||
| ? readElfSectionDirectory(source.size) | ||
| : readPeSectionDirectory(source.size), | ||
| ? readElfSectionDirectory( |
There was a problem hiding this comment.
Meter standalone AMDGPU directory reads against max_work_bytes
For a standalone AMDGPU ELF inspected with analysis: "inventory", this directory read uses the unmetered root GpuFileSource; #amdPayload subsequently reuses the directory and skips its metered parsing path. Consequently, the advertised aggregate budget does not cover standalone AMDGPU structure reads: an isolated file-source probe fully read a 6,528-byte section table with max_work_bytes: 1024 without reporting capacity, whereas the identical ELF inside a Clang bundle correctly hit that limit. Reserve aggregate work before these initial directory reads so standalone inputs cannot bypass the caller's admission budget.
AGENTS.md reference: AGENTS.md:L70-L70
Useful? React with 👍 / 👎.
…pgp-633-20261127 * commit '3097263763611eb0c32c502d5a222060cf02f468': fix(cli): describe universal Mach-O slice selection without a single-dash flag (#14912) fix(iso9660): read Joliet trees whose .. records name their own directory (#14817) feat(gpu)!: add per-call object, work, report, metadata, structure, and parser budgets to inspect_gpu_code_objects (#14882) fix(macho)!: select arm64e.x1 slices of universal Mach-O files by exact subtype (#14881) refactor(views): share bounded parent and report limitations (#14902) refactor(desktop): share XML parent pointers in task drafts (#14905) feat(ghidra): define function-pointer members and typedefs (#14889) refactor(setup): share publication destination checks (#14904) perf(ci): skip unused test runtime uploads (#14903) fix(nuget): preserve explicitly spaced publisher metadata (#14906) fix(artifacts): keep uImage coverage unknown when bytes follow the declared payload (#14896) fix(artifacts): report incomplete Android sparse coverage (#14883) fix(tar): require both end-of-archive blocks for complete coverage (#14884) refactor(views): centralize indexed row paging (#14878) refactor(views): reuse optional filters in report projections (#14877)
Summary
Addresses Issue 14235.
inspect_gpu_code_objectspreviously bounded object reads/decodes, aggregate work, retained reports, AMDGPU metadata, native ELF/PE section directories, parser entries, parser visits, and token/ID lengths with hardcoded ceilings that reportedfixed_ceilingrefusals without caller control.This PR adds eight optional per-call budgets to
inspect_gpu_code_objects(max_object_bytes,max_work_bytes,max_report_bytes,max_metadata_bytes,max_structure_bytes,max_parser_entries,max_parser_visits,max_token_bytes) while keeping every heap-bound maximum at main's existing ceiling. Top-level refusals report typeddetails.limit(adjustable_budget) with adapter-spelled recovery (cli_flagon CLI only); per-objectinspection: "capacity"limitations inside multi-object containers append(parameter: <name>). Genuine nesting caps (gpu-container-nesting-depth= 8,amdgpu-metadata-depth= 32) and the 128-token PTX single-parameter syntax cap stay fixed, superseded hardcoded ceiling constants are removed, and bothpendingentries forsrc/gpu/GpuCodeObjectsProvider.tsare removed fromscripts/verify/fixed-ceiling-registry.json.Problem and expected behavior
Before this change:
src/gpu/GpuCodeObjectsProvider.tsand its parsers (GpuSource.ts,GpuPayloadCodec.ts,ClangOffloadBundle.ts,CudaInfo.ts,AmdGpuMetadata.ts,PtxKernels.ts,GpuElfKernels.ts,GpuInventory.ts) enforced hardcoded ceilings (GPU_OBJECT_BYTES,GPU_REPORT_BYTES,AMD_METADATA_BYTES,CLANG_BUNDLE_MAX_*,AMD_METADATA_VALUES,AMD_METADATA_CONTAINER_ENTRIES,AMD_METADATA_VALUE_BYTES, and hardcoded work/PTX/CUDA counts) and mapped everyBinaryResourceFailuretofixed_ceiling("The GPU inspection allowance"/"The GPU object allowance").Expected behavior:
inspect_gpu_code_objectsaccepts eight optional per-call budgets (CLI--max-object-bytes,--max-work-bytes,--max-report-bytes,--max-metadata-bytes,--max-structure-bytes,--max-parser-entries,--max-parser-visits,--max-token-bytes), keeping existing defaults when omitted and preserving omission inEvidence.parameters:max_object_bytes: default134217728(128 MiB), range1..134217728(128 MiB)max_work_bytes: default536870912(512 MiB), range1..536870912(512 MiB; covers payload input, decoded output, native-section reads, and AMDGPU note/structure reads)max_report_bytes: default16777216(16 MiB), range1..16777216(16 MiB)max_metadata_bytes: default8388608(8 MiB), range1..8388608(8 MiB)max_structure_bytes: default16777216(16 MiB), range64..536870912(512 MiB) via sharedmaxStructureBytesSchemamax_parser_entries: default65536, range1..65536max_parser_visits: default262144, range1..262144max_token_bytes: default65536, range1..65536max_work_bytes <= 512 MiB,max_object_bytes <= 128 MiB,max_report_bytes <= 16 MiB,max_metadata_bytes <= 8 MiB, plus sharedmax_structure_bytesup to512 MiBwhen explicitly raised). Full-file SHA-256 streams fixed 1 MiB chunks independently ofmax_object_bytes, container padding scans clamp reads tomin(64 KiB, max_object_bytes), and standalone PTX format recognition confirms.version <major>.<minor>before applyingmax_object_bytesormax_token_bytesso non-GPU inputs fail withunsupported_target.code: "resource_constraint",details.limit(control_kind: "parameter",parameter,effective_value,minimum,maximum,default_value,unit,applies_at: "next_call", plusrequired_valuewhen known andcli_flagon CLI only), anddetails.refusal.kind: "adjustable_budget", retaining partial observations when available.inspection: "capacity"and append(parameter: <name>)to the object's limitation note. Multi-frame and trailing zero-output Zstandard CCOB v1 streams stopped at a frame boundary or partial next-frame magic verify whether another Zstandard/skippable frame follows (checkingzstd.max_framesfirst, refilling cached windows once without double-chargingdeclaredDecodedSize, or reportingmax_object_bytescapacity) before publishing an extent.gpu-container-nesting-depth= 8 levels,amdgpu-metadata-depth= 32 levels) remain"The GPU nesting allowance", and unmapped parser syntax limits (such as 128 tokens per PTX parameter declaration) remain fixed"The GPU parser syntax allowance"(representation) without escapingResult.Change and scope
src/domain/gpu/gpuCodeObjectsBudgets.ts(new): owns GPU budget defaults, ceilings, Zod fields, resolution,formatGpuByteBudget,gpuBudgetParameterForLimit,gpuCodeObjectsBudgetLimit, and GPU limit name constants.src/domain/gpu/gpuCodeObjects.tsandsrc/domain/gpu/gpuCodeObjectsEvidence.ts: wire...gpuCodeObjectsBudgetFieldsintoinspectGpuCodeObjectsInputSchema/GpuCodeObjectsInputand record caller-supplied budgets inEvidence.parameterswhile omitting unspecified ones.src/domain/compression/zstandardFrameWire.tsandsrc/domain/compression/zstandardExactFrame.ts: exportZSTANDARD_TRUNCATION_REASONS,isZstandardTruncationReason, andzstandardFrameMagicStatus; surfaceinputExhaustedandframeAllowanceReachedonZstandardFrameSuccesswhen prefix framing stops at an exact frame boundary or 1-3 byte next-frame magic prefix.src/gpu/GpuSource.ts,src/gpu/GpuPayloadCodec.ts, andsrc/gpu/CudaFatbinary.ts: threadGpuCodeObjectsBudgets; export sharedCONTAINER_SCAN_CHUNK_BYTES(64 KiB) fornextGpuContainerOffset, CCOB recovery, and PTX recognition; forwardsignaltonextGpuContainerOffsetinCudaFatbinary.ts; keepGpuFileSource.digest()streaming 1 MiB chunks; route native ELF/PE directory reads throughreadBoundedundermaxStructureBytes; enforceexpected > maxObjectBytesbefore decode and re-tag LZ4 limits asGPU_OBJECT_BYTES_LIMIT; carry optional lower-boundminimumReportBytesonGpuReportCapacityFailure(kept out ofdetails.limit.required_valueand reported indetails.reported_limits.minimum_report_bytes); exportisTruncatedGpuPayloadFailureand surfaceinputExhausted/frameAllowanceReachedfromdecodeGpuPayloadStream.src/gpu/GpuInventory.ts,src/gpu/ClangOffloadBundle.ts,src/gpu/PtxKernels.ts,src/gpu/AmdGpuMetadata.ts,src/gpu/CudaInfo.ts,src/gpu/GpuElfKernels.ts:GPU_OBJECT_BYTES,GPU_REPORT_BYTES,AMD_METADATA_BYTES,CLANG_BUNDLE_MAX_*,AMD_METADATA_VALUES,AMD_METADATA_CONTAINER_ENTRIES,AMD_METADATA_VALUE_BYTES).native-sectionsectionSourceand#amdPayloadchildreads againstmax_work_bytes(#budgetWorkfor object reads,#reserveWorkforNATIVE_STRUCTURE_LIMITand explicitreadWorkOnlyrecognition reads) while tracking#meteredSources(!parentMeteredand#reserveReadWork) to prevent double-charging; share#checkObjectBytesacross#budgetWorkand metered standalone PTX probes.declaredDecodedSizeonce on CCOB v1 cached-window refill (readWindow(false)), peek 4 bytes pastconsumedByteswheninputExhaustedto checkzstd.max_frames, refill, or reportccobWindowLimit(), and extendfindLegacyCcobRecoveryTotalread end by 4 bytes so corrupt v1 extents equal tomax_object_bytesstill recover an immediately following CCOB marker starting at<= base + max_object_bytes.createPtxVersionScanner()(matchingptxVersion's safe-integer digit rules without retaining scanned chunks, so peak standalone PTX heap stays at 1xprobeSizewith zeroBuffer.concatcopies) and defermax_token_bytesinreadPtxTargetuntil.version <major>.<minor>is confirmed — then validate both recognized header tokens againstmax_token_bytes— so non-GPU inputs fail withunsupported_targetwhile recognized PTX headers remain bounded in bothinventoryandkernelsmodes; keep the 128-token PTX single-parameter syntax limit fixed with its own message (PtxKernels.ts:432and:491); exempt fixed-width MsgPack float32/float64 scalars (0xca/0xcb) frommaxTokenBytes; enforce the 1024-byte baseline report reservation withminimum_report_bytesindetails.reported_limitsand preserve whole-MiB"512 MiB per inspection"wording.src/gpu/GpuCodeObjectsProvider.tsandscripts/verify/fixed-ceiling-registry.json: map each adjustable GPU limit viagpuBudgetParameterForLimit(surfacingminimum_report_bytesindetails.reported_limitswhile omittingrequired_valueon lower-bound report refusals) /nativeStructureLimit, retain"The GPU nesting allowance"for container/AMDGPU depth, and map unmapped fixed parser limits to"The GPU parser syntax allowance"(both registered as"representation"; bothpendingentries removed).src/cli/gpuCommands.ts: expose all eight--max-*CLI flags and forward only caller-supplied values.scripts/verify/advertised-schemas/tools/inspect_gpu_code_objects.json: update advertised schema summary (input compact: "48e65025c05627f4").docs/reference/limits-and-recovery.md,docs/reference/rea-limit-inventory.md, anddocs/gpu-code-objects.md(includingmax_report_bytesscan wording, native-section/AMDGPU structure reads undermax_work_bytes, and the fixed 128-token PTX parameter row).src/domain/compression/zstandardExactFrame.test.ts,src/gpu/GpuPayloadCodec.test.ts,src/gpu/AmdGpuMetadata.test.ts,src/gpu/PtxKernels.test.ts,tests/boundary/gpu/codeObjects.test.ts, andtests/acceptance/gpuCodeObjectsCli.test.ts.Contribution scope: not applicable (per-call budget controls replacing two tracked
pendingfixed ceilings on an existing read-only GPU code object reader; no new provider, execution, injection, or mutation).Contract and boundary impact
src/domain/gpu/gpuCodeObjectsBudgets.tsowns all GPU-specific budget bounds, Zod fields, resolution, andLimitRefconstruction (max_structure_bytesreusessrc/domain/native/nativeStructureBudget.ts);gpuCodeObjects.ts,gpuCodeObjectsEvidence.ts,src/cli/gpuCommands.ts, andsrc/gpu/*consume them directly. Superseded ceiling constants are removed.inspect_gpu_code_objectsadds eight optional per-call budget parameters (--max-object-bytes,--max-work-bytes,--max-report-bytes,--max-metadata-bytes,--max-structure-bytes,--max-parser-entries,--max-parser-visits,--max-token-bytes), and top-level GPU budget refusals now reportdetails.limitanddetails.refusal.kind: "adjustable_budget"instead offixed_ceiling. Per-objectinspection: "capacity"limitations inside multi-object containers append(parameter: <name>). Omitted budgets remain omitted inEvidence.parameters.Evidence.parametersonly when explicitly supplied.max_object_bytesas primary alongside cleanup facts and retained partial observations.docs/public/product-catalog.json), package, or installation impact: updatedscripts/verify/advertised-schemas/tools/inspect_gpu_code_objects.json(POSIX summary).Expected effects:
Evidence and regression coverage
tests/boundary/gpu/codeObjects.test.ts:enforces per-call GPU budgets and recovers when raised: exercises all eight budgets with typeddetails.limit/ per-object(parameter: ...)capacity limitations and retry recovery.respects max_object_bytes during container scanning and full-file digesting: spies onGpuSource.readBoundedduringnextGpuContainerOffset(sizeandlimit <= 512) and verifies 32 KiB full-file SHA-256 streams independently ofmax_object_bytes: 1.keeps PTX single-parameter 128-token ceiling fixed independently of max_parser_entries: pins main's existing fixed 128-token syntax cap on entry parameter lists and PTX 1.3 body.paramdeclarations (with its fixed syntax message and no(parameter: max_parser_entries)), while verifyingmax_parser_entries: 4still accepts a normal single-parameter kernel.keeps corrupt CCOB v1 recovery distinct from max_object_bytes window truncation: covers corrupt v1malformedrecovery of a later v2 sibling, stored zlib truncation (ccobWindowLimit()), multi-frame Zstd (+0/+1/+2/+3) withdecoded <= budget < encoded, trailing zero-output Zstd (skippable and empty frames) at+0/+1/+2/+3/header/body plus cached-window refill, exact-fit Zstd followed by NUL or__CLANG_OFFLOAD_BUNDLE__('_' = 0x5f) without false refusals or double-charged refills, 40 aliased 32-section AMDGPU entries undermax_work_bytes: 16_384(recovering at512 KiB), andmax_work_bytes <= 512 MiBschema enforcement.does not double-charge work on CCOB v1 refill, bounds aliased sections, keeps non-GPU inputs unsupported, and aligns zstd.max_frames and recovery bounds: covers single-chargeddeclaredDecodedSizeon cached refill, post-refill secondhasFollowingZstandardFramebefore trailing NUL, 40 aliased.hip_fatbinsections pointing to a 3,860-byte PTX payload undermax_work_bytes: 16_384(exact 4complete, 36capacity), single.hip_fatbin6,060-byte PTX undermax_work_bytes: 6100(complete) andmax_object_bytes: 4096(capacity), single-charged work across metered CCOB v2, nested.hip_fatbinELF sections, and nested.hip_fatbinAMDGPU ELF, non-GPU plain text under loweredmax_object_bytes(512,1) andmax_token_bytes(16), recognized PTX.versionheader enforcement underanalysis: "inventory", max_token_bytes: 7and 70,000-byte zero-padded version under defaultmax_token_bytes: 65_536,zstd.max_frames: 1precedence at+0..+4, corrupt CCOB v1 recovery when total length equalsmax_object_bytes(vsmax_object_bytes + 1), andCudaFatbinarycancellation during NUL padding scan.applies max_structure_bytes independently of max_object_bytes and covers PE, CUBIN, and report baseline: coversmax_object_bytes < max_structure_bytesELF reading, constructor baselinemax_report_bytes: 500refusal omittingdetails.limit.required_valuewhile reportingdetails.reported_limits.minimum_report_bytes(and succeeding on empty ELF when retried with that bound), PEmax_structure_bytes, and CUBINmax_parser_visits.reports aggregate Clang directory capacity when every ID fitsto verify typeddetails.limit(max_report_bytes,adjustable_budget).src/domain/compression/zstandardExactFrame.test.ts: pinsinputExhaustedacross frame-boundary EOF, 1-3 byte Zstandard/skippable magic prefixes (true), and definite non-frame suffixes (false), including cooperative decode andallowance(1, "runtime")prefix mode.src/gpu/GpuPayloadCodec.test.ts: pinsinputExhaustedandisTruncatedGpuPayloadFailureacross truncated, corrupt, and output-overflow zlib and Zstandard streams.src/gpu/PtxKernels.test.ts: verifiesreadPtxTargetdoes not preempt non-PTX text withmax_token_bytes: 16, enforcesmax_token_byteson recognized.version(max_token_bytes: 7) and 70,000-byte zero-padded version tokens as well as subsequent tokens, and verifiescreatePtxVersionScanneragrees withreadPtxTargeton >32-byte leading-zero version literals.src/gpu/AmdGpuMetadata.test.ts: verifies a MsgPack float64 scalar (0xcb) is not falsely rejected whenmaxTokenBytesis4.tests/acceptance/gpuCodeObjectsCli.test.ts: verifies CLI--max-report-bytesrefusal (cli_flag,maximum: 16777216,adjustable_budget) and recovery (Evidence.parameters), MCPmax_report_bytesrefusal (nocli_flag), and omitted-budget preservation.366e1d98c: running the original six new/updated budget tests failed6 failed | 150 skipped (156). After restoring the fixed 128-token PTX single-parameter cap to match base,keeps PTX single-parameter 128-token ceiling fixed independently of max_parser_entriesintentionally pins base behavior (green on base, fails if widened back toMath.max(128, maxParserEntries)).probe-mem.mts, 12 MiB PTX, Node--expose-gc):366e1d98c:inventory10.84 MiB(bigConcats: []),kernels11.98 MiB(bigConcats: []).5fb97d906(retainedscannedChunks+Buffer.concat):inventory23.94 MiB,kernels24.00 MiB(bigConcats: [12582912]).a855caa51(unchanged in00e8705aa, streaming recognition without retaining chunks):inventory12.00 MiB(bigConcats: []),kernels12.00 MiB(bigConcats: []).c77939148:respects max_object_bytes|keeps corrupt CCOB v1failed2 failed | 154 skipped (156).937081dc0: trailing skippable and empty Zstandard frames after a complete data frame failed8/8(+0/+1/+2/+3) withUnexpected bytes between Clang offload bundles.b3394fc9f: standalone probe of 40 aliased 64-section (4,096-byte section table) AMDGPU entries undermax_work_bytes: 32_768reportedcapacityCount: 0(vscapacityCount: 33with(parameter: max_work_bytes)after the#reserveWorkfix).b262e3c15: standalone probes reproduced CCOB v1 cached-refill work double-charge (max_work_bytes: 883->capacityvs["complete", "complete"]), 40 aliased.hip_fatbinsections pointing to 4,860-byte PTX undermax_work_bytes: 16_384(bytesRead: 198,503, capacityCount: 0vsbytesRead: 18,683, capacityCount: 37), non-GPU 1,200-byte text withmax_object_bytes: 512and 59-byte text withmax_token_bytes: 16(AnalysisResourceConstraintErrorvsunsupported_target),[skippable, data]+zstd.max_frames: 1at+0..+3(max_object_bytescapacity vszstd.max_frames), and corrupt CCOB v1 of length200 === max_object_bytesbefore valid v2 (["capacity"]vs["malformed", "complete"]).5fb97d906(9/9killed):readWindow(true)double-charge, removingsectionSourcework metering, bypassing incremental PTX recognition with directsource.read, enforcingmax_token_bytesbefore.versioninreadPtxTarget, removing the post-refill secondhasFollowingZstandardFramecheck, removingframeAllowanceReachedprecedence, shrinkingfindLegacyCcobRecoveryTotalsearchEndback tomaxStart, and widening either PTX 128-token guard (PtxKernels.ts:432and:491) toMath.max(128, maxParserEntries).a855caa51(6/6killed): disabling#reserveReadWork's metered branch, removing#checkObjectBytes(probeSize)on metered standalone PTX probes, removing!parentMeteredonsectionSource.readWorkOnly, removing!parentMeteredon#amdPayloadchild.readBounded, droppingsignalfromCudaFatbinarynextGpuContainerOffset, and omitting the baseline bound fromGpuReportCapacityFailure.00e8705aa(3/3killed, clean restore): dropping the post-recognition length check onfirst.value(.version), dropping the post-recognition length check ondeclaredVersion.value, and passingminimumReportBytesback intoBinaryResourceFailure'slimit.required.rea inspect-gpu-code-objects <sample.ptx> --analysis kernels --max-report-bytes 64 --jsonexits1withcode: "resource_constraint",details.limit(control_kind: "parameter",parameter: "max_report_bytes",cli_flag: "--max-report-bytes",effective_value: 64,minimum: 1,maximum: 16777216,default_value: 16777216,unit: "bytes",applies_at: "next_call", omittingrequired_valuebecause it is a lower bound),details.reported_limits.minimum_report_bytes,details.refusal.kind: "adjustable_budget", andremediation.actionnaming--max-report-bytes; retrying with--max-report-bytes 1048576exits0and recordsmax_report_bytes: 1048576inEvidence.parameters. MCPinspect_gpu_code_objectsomitscli_flagand preserves omitted budgets inEvidence.parameters.npm run check:prwas not run locally; advertised schema summary forinspect_gpu_code_objectswas verified on Windows via in-process POSIX platform preload ({"tools":241,"same":241,"differ":[],"missing":[]}) and Linux CI will confirmverify:advertised-schemas.For evidence-bearing changes:
Validation performed
Executed on Windows (Node.js v24.22.1, base
366e1d98c, head00e8705aa):npm run build:cached— passed{"tools":241,"same":241,"differ":[],"missing":[]}(scripts/verify/advertised-schemas/tools/inspect_gpu_code_objects.json,input compact: "48e65025c05627f4")npx vitest run --cache=false src/gpu/PtxKernels.test.ts tests/acceptance/gpuCodeObjectsCli.test.ts—63 passed(PtxKernels.test.ts40/40,gpuCodeObjectsCli.test.ts23/23); full 10-file unit/process-global/CLI/MCP suite passed140/140ona855caa51npx vitest run --cache=false tests/boundary/gpu/codeObjects.test.ts -t "does not double-charge work|applies max_structure_bytes|enforces per-call GPU budgets"—3 passed | 154 skipped (157)(full 10-case targeted boundary suite passed10/10ona855caa51)node scripts/verify/fixed-ceilings.mjs— passed (Fixed ceilings: 66 declarations registered; 29 pending a control. Authored-only refusals: 57.)npx knip(uncached) — passed (0 errors)npm run check:fast— passed (typecheck,lint,verify:architecture-guardsacross 3240 source files)Compatibility, safety, and release
BREAKING CHANGE:inspect_gpu_code_objectsadds eight optional per-call budget parameters (max_object_bytes,max_work_bytes,max_report_bytes,max_metadata_bytes,max_structure_bytes,max_parser_entries,max_parser_visits,max_token_bytes) and reportsdetails.limit+adjustable_budgetinstead offixed_ceilingon top-level GPU budget refusals. Under default budgets, large non-GPU inputs that previously hit the standalone PTX scan ceiling now fail withunsupported_targetonce incremental format recognition confirms the first module token is not.version <major>.<minor>. All defaults match previous behavior when omitted. Migration: callers matchingdetails.refusal.kind === "fixed_ceiling"on GPU budget refusals should readdetails.limit(adjustable_budget) and retry with a larger budget within the documented ceiling.scripts/verify/advertised-schemas/tools/inspect_gpu_code_objects.jsonupdated.max_work_bytes <= 512 MiB,max_object_bytes <= 128 MiB,max_report_bytes <= 16 MiB,max_metadata_bytes <= 8 MiB), native-section and AMDGPU structure reads metered undermax_work_bytes, and fixed nesting/syntax caps (8 container levels, 32 AMDGPU metadata levels, 128 tokens per PTX parameter declaration); no execution, filesystem writes, or network access.Author readiness
Human owner: @Plastic-time
Author checklist (completed by the PR author before requesting review)
type(scope): outcome.REA_runtime setting with a default, floor, and maximum, unless a fixed ceiling has a stated reason. See Adding a runtime setting.