Skip to content

Treat an isolated Lean resource-limit failure as declaration feedback - #62

Merged
LikC1606 merged 1 commit into
mainfrom
fix/resource-limit-feedback
Nov 29, 2026
Merged

LikC1606 merged 1 commit into
mainfrom
fix/resource-limit-feedback

Conversation

@LikC1606

Copy link
Copy Markdown
Collaborator

A declaration check that exhausts the fixed Lean sandbox memory or stack limit on one isolated declaration is now returned to Lead as correctable feedback, instead of ending the run as an infrastructure failure.

Cause, from the balance-7-recovery run:

  • The Lead adopted a member delivery. The same declarations had passed in the member's own check.
  • The recheck in the Lead worktree hit INTERNAL PANIC: out of memory on visibleForward.
  • flushAdoptions treated it as non-correctable and rethrew it, so the run finished runtime_error.
  • The 10-27 handling for resource limits lived in the old cooperation path, which was removed when collaboration moved to Codex native teams.

Change:

  • correctableDeclarationCheck in declarationArtifacts.ts accepts Lean diagnostics, plus a resource-limit failure when the verification has a single result. Batched checks are retried in isolation, so a single result is the attributable case.
  • Member deliveries, Lead adoptions, helper submissions (agentTeam.ts) and the Lead's own declaration requests (skillProofLifecycle.ts) use it.
  • A multi-result resource-limit failure is still math_verifier_unavailable.

Tests:

  • skillResearchRuntime: new memory-limit and shared-memory-limit cases.
  • agentTeamSourceRecovery: a member nomination and a Lead adoption that hit the memory limit. Both return a failed event to Lead and keep the team running.
  • The new cases fail without the source change.
  • 25 related test files pass (373 tests). tsc --noEmit and bun run build pass.

Not done: no real-problem run. Running solvers were not changed.

🤖 Generated with Claude Code

A declaration check that exhausts the fixed Lean sandbox memory or stack
limit for one isolated declaration is a property of the checked source,
the same as a Lean diagnostic. Since team collaboration moved to Codex
native teams, the team paths only treated Lean diagnostics as
correctable, so such a failure was raised as an infrastructure error.

balance-7-recovery died this way: the Lead adopted a member delivery,
the recheck in the Lead worktree hit the memory limit on one
declaration, and flushAdoptions rethrew it, ending the run with
runtime_error.

correctableDeclarationCheck now accepts a resource-limit failure when
the verification holds a single result (batched checks are retried in
isolation, so this is the attributable case). Member deliveries, Lead
adoptions, helper submissions and the Lead's own declaration requests
use it, so the failure is returned to Lead as a rejected check. A
shared multi-result failure is still a verifier failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LikC1606
LikC1606 merged commit 82d66b0 into main Nov 29, 2026
4 checks passed
@LikC1606
LikC1606 deleted the fix/resource-limit-feedback branch December 1, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant