Skip to content

feat(errors): name a deadline's parameter or environment control in details.limit - #11172

Merged
morluto merged 1 commit into
mainfrom
feat/timeout-limit-source
Nov 15, 2026
Merged

morluto merged 1 commit into
mainfrom
feat/timeout-limit-source

Conversation

@morluto

@morluto morluto commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Summary

Refs #10508 (Phase 6.1). Deadlines whose control is a per-call parameter or a launch environment variable now name that control in details.limit, so agents and tests read it from a field instead of the remediation sentence.

Problem and expected behavior

  • details.limit could only name a registered analysis setting. The macOS native command (native_command_timeout_ms), native UI (native_ui_deadline_ms), pwntools (pwntools_timeout_ms) and swiftc ownership-helper compile (REA_SWIFTC_COMPILE_TIMEOUT_MS) deadlines have no registered setting, so their control existed only in prose and tests matched it by substring.
  • Expected: the failing owner reports the control kind, name, effective value, bounds, default and application point.

Change and scope

  • AnalysisLimit = AnalysisSettingLimit | AnalysisControlLimit. The new arm has control_kind: "parameter" (parameter, cli_flag, applies_at: "next_call") or control_kind: "environment" (environment, applies_at: "next_startup", re-scoped to "next_invocation" for a one-shot caller).
  • nativeDeadlineRecovery returns the limit with its text, so all three per-call native deadlines bind it from one place; the swiftc compile timeout binds the environment limit.
  • Typed adjustable_budget refusals still come only from registered-setting limits.
  • Not included: registering new settings, and the ~50 other AnalysisTimeoutError sites without a limit (most have no caller-adjustable control).
  • Documented in docs/design/limits-and-recovery.md.

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

  • Semantic owner and earliest changed stage: AnalysisLimit (src/domain/analysisSettings.ts) is the shared details.limit owner; nativeDeadlineRecovery (domain/native/nativeDeadlines.ts) now returns the parameter limit with its recovery text, and DarwinProcessOwnershipInspectionError.compileTimeout returns the environment limit. invocationLimit (analysisSettingDefinitions.ts) re-scopes both kinds for one-shot callers and replaces the setting-only invocationSettingLimit export
  • Contribution scope fit and linked maintainer decision: Phase 6.1 ([Design] Assert structured remediation facts instead of guidance prose #10508); field shape chosen by the coordinator instead of registering new settings
  • CLI and MCP/tool-catalog contract: additive: error details.limit now present on these deadline errors; no schema or catalog change (error details are untyped JSON)
  • Provider, bridge, target-format, or platform compatibility: none
  • Evidence, artifact, provenance, or reconstruction contract: none
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): none; update_analysis_settings gains no settings
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs and skills/; edit authored instructions in .agents/skills/reverse-engineer-anything/ and never commit build outputs): none

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: NativeCommandAnalysisError.test.ts (swiftc compile deadline: environment limit, plus next_invocation for an invocation caller; native command deadline: parameter limit, replacing remediation substring checks), PwntoolsFailures.test.ts, NativeUiObservation.test.ts (parameter limit instead of message/remediation substrings), tests/boundary/process/darwinProcessRunTokenReader.test.ts (compileTimeout.limit instead of five message matches; compiler diagnostics stay asserted)
  • Base reproduction or other evidence: with the source files reverted to the base, the 5 converted tests fail and 94 pass
  • User-visible CLI/MCP output (if applicable): a native command timeout now carries details.limit: {"control_kind":"parameter","parameter":"native_command_timeout_ms","cli_flag":"--native-command-timeout-ms","effective_value":60000,"unit":"ms","minimum":1,"maximum":2147483647,"default_value":60000,"applies_at":"next_call"}; remediation text is unchanged
  • Remaining proof gaps: no real macOS swiftc/Xcode deadline run; the darwin boundary test uses a hanging fake xcrun

For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • npm run test:focused -- src/native/NativeCommandAnalysisError.test.ts src/native/pwntools/PwntoolsFailures.test.ts src/native/NativeUiObservation.test.ts tests/boundary/process/darwinProcessRunTokenReader.test.ts: 99 passed (base: 99). Warm wall / CPU (user+sys): before 18.4 / 9.3 s, after 20.1 / 9.1 s (includes focused-build prerequisite checks; no test-count change).
  • Same files with source reverted to base: 5 failed, 94 passed.
  • npm run typecheck, npm run check:fast: passed. npm run docs:check: passed.
  • command — result

Compatibility, safety, and release

  • Breaking changes or migration steps: none. Additive: a details.limit with control_kind has no setting, agent_editable, scope, update_mode or pending_restart; existing setting limits are unchanged and have no control_kind. TypeScript consumers of AnalysisError.limit narrow with "control_kind" in limit
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable
  • Package or release metadata impact: none
  • Security, privacy, process, or containment review: none

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@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-15T13:42:35.262906Z
We couldn’t complete this review. Comment @codex review to try again.
7a4f034 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.

@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The reviewed changes appear safe to merge.

Summary

Adds structured parameter and environment controls to deadline errors through details.limit.

  • Per-call timeout errors name their parameter in details.limit.
  • Compiler timeout errors name the ownership helper's environment variable.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  P[Native deadline owner] --> C[Parameter limit]
  S[Ownership-helper compiler] --> E[Environment limit]
  C --> A[AnalysisTimeoutError]
  E --> A
  A --> L{Caller lifetime}
  L -->|Continuing| K[Keep application point]
  L -->|One-shot| I[Environment becomes next_invocation]
  K --> D[details.limit]
  I --> D
Loading

Reviews (1) · Last reviewed commit: "feat(errors): name a deadline's paramete..." · Reviewed by Greptile

@morluto
morluto merged commit 863d82e into main Nov 15, 2026
7 checks passed
@morluto
morluto deleted the feat/timeout-limit-source branch November 15, 2026 13:49
@morluto morluto added area: domain Domain logic, errors, and pure functions enhancement New feature or request labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: domain Domain logic, errors, and pure functions enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant