Skip to content

feat(artifacts): back archive member counts with the artifact.member_count setting - #14650

Merged
morluto merged 4 commits into
mainfrom
feat/artifact-session-settings
Nov 26, 2026
Merged

morluto merged 4 commits into
mainfrom
feat/artifact-session-settings

Conversation

@morluto

@morluto morluto commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

Part of #14236. Follow-up to #14625. Adds one session-adjustable default for the archive reader family: artifact.member_count. It backs the per-call member-count fields of artifact_limits, so a refusal offers both recovery routes: the per-call field for one large archive, then update_analysis_settings for repeated work.

Setting added (one family)

Setting Launch seed Default Range Backs
artifact.member_count REA_ARTIFACT_MEMBER_COUNT 100,000 1..2,147,483,647 artifact_limits.bun.module_count, dotnet_bundle.entry_count, node_sea.asset_count, deno.vfs_entries

Why this one. Member counts are the reader limit an agent is most likely to hit again and again in one session. Triaging many large bundles, packages or compiled apps produces the same refusal on each archive. The four fields share one meaning (members admitted from one container) and one default (100,000), so a single setting maps onto them without per-reader exceptions. Setting IDs are enumerated in update_analysis_settings' advertised schema, so every setting costs tokens in every session; one family keeps that cost to one ID.

Considered and left per-call only:

  • expanded_bytes: its default is derived from each archive's encoded size, so one fixed session default would change its meaning.
  • Directory and metadata representation bytes: the defaults and maxima differ per reader.
  • ISO 9660 record_count: its default is 262,144, not 100,000.
  • Structural limits: path parts and nodes, nesting depth, table records and single-document sizes are one-off per input.

Behavior

  • Precedence for those four fields:
    1. the explicit artifact_limits field;
    2. the accepted operation's runtime override;
    3. a valid REA_ARTIFACT_MEMBER_COUNT (an invalid seed is refused, not replaced by the default);
    4. 100,000.
  • ArtifactReaderPolicy (in ArtifactProvider) resolves the session value once per call, then passes it to resolveArtifactReaderLimits. Each call is one inspect_artifact, extract_artifact or inventory_artifact on a session target or a directory.
  • When neither a caller selection nor a non-default session value applies, readers keep their own defaults and Evidence still omits effective_limits. With a non-default session value, effective_limits reports the resolved policy, and parameters still records only what the caller sent.
  • A refusal at one of the four fields keeps details.reader_limit and also binds details.limit as the setting's limit, with parameter set to the field and source set to request, runtime, setting or default. required_value is passed through only when it is a number, so lower-bound omission from fix(artifacts): omit required_value where reader limits know only a lower bound #14646 is preserved.
  • src/domain/analysisErrorRefusal.ts, a shared file, gets one narrow addition: an ArtifactOperationError that carries a reader limit and a bound setting limit derives the adjustable_budget refusal. The generated recovery from feat(limits)!: report the value a per-call limit needs and derive its recovery #14625 then names both routes. ASAR admission errors carry no reader limit, so their recovery is unchanged.

Validation

  • tests/acceptance/artifactReaderLimitsCli.test.ts (13 tests, compiled CLI):
    • REA_ARTIFACT_MEMBER_COUNT=1 refuses a two-entry .NET bundle. details.limit reports setting: "artifact.member_count", parameter: "artifact_limits.dotnet_bundle.entry_count" and source: "setting". The recovery names the field and REA_ARTIFACT_MEMBER_COUNT.
    • An explicit --artifact-limits entry count of 2 wins over the seed.
    • A seed of 2 admits the bundle, with effective_limits reported and parameters unchanged.
  • Each run alone: src/application/AnalysisSettings.test.ts and src/domain/analysisRefusal.test.ts.
  • docs:check and advertised-schema regeneration (inspect_analysis_settings and update_analysis_settings summaries). The focused build compiles the sources. Typecheck, full lint and broad suites are left to CI to keep local load down.
  • tests/acceptance/artifactMemberCountMcp.test.ts (stdio MCP, the session route): update_analysis_settings with artifact.member_count = 1 refuses a two-entry .NET bundle. details.limit and details.refusal name artifact.member_count with source: "runtime", and the recovery names both the per-call field and update_analysis_settings. An explicit artifact_limits entry count of 2 wins over the session value, and setting it to 2 admits the same bundle.

…count setting

Archive member, entry, module and asset counts are the reader limit an
agent is most likely to raise repeatedly in one session. A new runtime
setting, artifact.member_count (launch seed REA_ARTIFACT_MEMBER_COUNT,
default 100,000), now supplies the default for artifact_limits
bun.module_count, dotnet_bundle.entry_count, node_sea.asset_count and
deno.vfs_entries. An explicit artifact_limits field still wins for that
call. A refusal at one of those fields reports the setting's limit with
the field as parameter and the value's source, so its recovery names
the per-call field and update_analysis_settings (or the launch seed on
the CLI). When a non-default session value applies, Evidence reports
the resolved effective_limits.
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-26T03:57:03.315432Z
We couldn’t complete this review. Comment @codex review to try again.
bd094dc PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…tdio MCP

update_analysis_settings at 1 refuses a two-entry .NET bundle with the
setting, source runtime and both recovery routes; an explicit
artifact_limits field wins over the session value; raising the setting
to 2 admits the same bundle.
@greptile-apps

greptile-apps Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The reviewed changes appear safe to merge, with no new actionable issues found.RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The reviewed changes appear safe to merge, with no new actionable issues found.

Summary

Adds artifact.member_count as the shared default for four archive member counts.

  • Artifact operations can share one member-count setting across four archive readers.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Artifact operation] --> B{Explicit count field?}
  B -->|Yes| C[Use caller value]
  B -->|No| D[Runtime override, then launch seed, then default]
  C --> E[Reader enforces count]
  D --> E
  E --> F{Count exceeded?}
  F -->|Yes| G[Report field, setting, source and recovery]
  F -->|No| H[Return artifact evidence]
Loading

Reviews (4) · Last reviewed commit: "fix(config): own the artifact.member_cou..." · Reviewed by Greptile

Comment thread src/artifacts/ArtifactProvider.ts Resolved
When a call selects every field artifact.member_count backs, the
session value and its launch seed are no longer read, so an invalid
REA_ARTIFACT_MEMBER_COUNT cannot block an explicit per-call recovery;
a request-sourced refusal still names the setting. The setting now
lists inventory_artifact, which it also applies to.
…ettings module

Resolving the seed through launchAnalysisSetting made
runtimeAnalysisSettings import the launch schema map, which imports
modules that import runtimeAnalysisSettings; the cycle left the bridge
reply schema uninitialized in some load orders. The seed now has its
own owner, src/config/artifactMemberCount.ts, like the pwntools input
seed, and the definition names its environment variable literally as
the numeric-limits guard requires.
@morluto
morluto merged commit 3129747 into main Nov 26, 2026
49 checks passed
@morluto
morluto deleted the feat/artifact-session-settings branch November 26, 2026 04:40
vincentkoc added a commit that referenced this pull request Nov 26, 2026
…o-21113-20261126

* commit 'd63982890e70c55b09704249cde0327537e610f0':
  refactor(views): share default page request fields (#14633)
  test(dotnet): stop expecting required_value for the lower-bound path-depth refusal
  feat(limits)!: raise disk-backed admission defaults for large ordinary targets (#14653)
  feat(artifacts): back archive member counts with the artifact.member_count setting (#14650)

# Conflicts:
#	tests/acceptance/dotnetBundleJourney.test.ts
vincentkoc added a commit that referenced this pull request Nov 26, 2026
…-beta3-20261126

* commit 'd63982890e70c55b09704249cde0327537e610f0':
  refactor(views): share default page request fields (#14633)
  test(dotnet): stop expecting required_value for the lower-bound path-depth refusal
  feat(limits)!: raise disk-backed admission defaults for large ordinary targets (#14653)
  feat(artifacts): back archive member counts with the artifact.member_count setting (#14650)
  build(deps): update Knip to 6.46.1 (#14641)
  fix(native)!: report details.limit for remaining native reader budgets and make BEAM table rows adjustable (#14631)
  perf(ci): omit unused PR associations from timing queries (#14636)
  perf(ci): resolve small pinned test batches directly (#14638)

# Conflicts:
#	tests/acceptance/dotnetBundleJourney.test.ts
@morluto morluto added area: evidence Evidence, artifacts, and reconstruction enhancement New feature or request labels Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: evidence Evidence, artifacts, and reconstruction enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant