Skip to content

Try the tactic battery on submitted sorry helpers - #82

Merged
LikC1606 merged 2 commits into
mainfrom
feat/tactic-battery-grind
Dec 1, 2026
Merged

LikC1606 merged 2 commits into
mainfrom
feat/tactic-battery-grind

Conversation

@LikC1606

@LikC1606 LikC1606 commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Since #52 the host tactic battery (closeTaskByTactics) had no caller. This wires it back into the native team flow, and adds grind.

  • AgentResearchTeam.closeSubmittedSorries runs the battery on each declared theorem whose body still contains sorry or admit, against the exact submitted type. It skips definitions, files outside the problem, and original problem declarations.
  • It is called inside exclusiveCheck:
    • in flushHelperSubmissions, before landVerifiedHelpers;
    • in finishDelivery, only before the first check (when pending.commit is unset).
  • A closure is written and committed in the stopped writer's worktree, and the member receives a host message. The ordinary Lean check still decides acceptance. A failed or unavailable attempt leaves the submission unchanged.
  • All declarations of one submission share a single bound: min(proofTimeoutMs, 120 s).
  • Emits task_tactic_battery with declaration, status, applied, vacuous and cache fields. The web already labels this event.
  • grind is appended last to the battery and to the vacuity probe when lean-toolchain is v4.24 or newer. This was checked against real Lean 4.24–4.36; on 4.8 it is an unknown tactic.
  • M2 version gains submitted-helper-tactic-battery-v1/battery-grind-v1, and the pinned method digests in webModuleIdentity.test.ts are refreshed.

Tests

  • New real-Lean tests in agentTeamNativeLifecycle:
    • a sorry helper is closed and delivered, in both helper and proof delivery modes;
    • a false helper is left unchanged and not delivered.
  • New grind toolchain gating and closure tests in tacticBattery.
  • agentTeamSourceRecovery "returns a standalone helper containing sorry" now uses a False helper, because the battery closes True.
  • Results:
    • focused suites (agentTeam*, tacticBattery*, definitionTasks, webModuleTelemetry, incrementalHelpers*, solver, webModuleIdentity) pass;
    • tsc --noEmit passes;
    • bun scripts/build.ts passes.

Not done

Not deployed, and running solvers are untouched. There is no measured effect on any problem yet.

Known edge: if the process crashes after a battery commit and before delivery, the completion recovery path, which requires HEAD to equal task.sourceCommit, will not re-nominate that delivery. The member's next submission does.

🤖 Generated with Claude Code

LikC1606 and others added 2 commits December 1, 2026 15:05
Since #52 the host tactic battery had no caller. The native team now runs
it on each declared theorem whose body still contains `sorry` or `admit`,
against the exact submitted type, before the ordinary Lean check of a
helper submission or of the first check of a proof delivery. A closure is
written and committed in the stopped writer's worktree and the member is
told; the ordinary check still decides acceptance. A failed or
unavailable attempt leaves the submission unchanged. All declarations of
one submission share a single 120 s bound.

`grind` is appended last to the battery and to the vacuity probe when
the project's lean-toolchain is v4.24 or newer.

The M2 version gains `submitted-helper-tactic-battery-v1` and
`battery-grind-v1`, so the pinned method digests are refreshed. The
standalone sorry-helper rejection test now uses a `False` helper, since
the battery closes `True`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LikC1606
LikC1606 merged commit 14c40d0 into main Dec 1, 2026
4 checks passed
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