Skip to content

Architecture 9 Cursor strategy and isolated OProver residency - #236

Open
FluffyAIcode wants to merge 38 commits into
mainfrom
AgentMemory/architecture9-cursor-oprover-0727
Open

Architecture 9 Cursor strategy and isolated OProver residency#236
FluffyAIcode wants to merge 38 commits into
mainfrom
AgentMemory/architecture9-cursor-oprover-0727

Conversation

@FluffyAIcode

@FluffyAIcode FluffyAIcode commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • cut proof orchestration over to Architecture 9 with Cursor SDK advisory strategy and host-owned, content-addressed plan compilation
  • add target-context isolation, exact provider provenance, and typed DEFINITION_RESOLUTION_PLAN remediation when no elaborated theorem exists
  • reconcile Gemma residency by live executable/model/revision/health/start generation, rejecting stale owners and PID reuse
  • add durable target-bound report provenance, exclusive single-use resume leases, and signed resume certificates
  • prohibit Proof Search and OProver for definition-remediation certificates until a Research Contract exists
  • dispatch consumed definition-remediation certificates directly to the host-owned Definition Resolution gate
  • exhaust every configured target-interface, Mathlib, theorem-card, evidence, history, publication, typed-synthesis, and rewrite source before issuing a mathematical terminal blocker

Safety properties

  • model memo can select only registered short IDs and cannot set plan or interface content
  • planning-only proof skeletons remain infeasible
  • remediation certificates route only to DEFINITION_RESOLUTION and explicitly set proof_search_allowed=false and oprover_allowed=false
  • certified Definition Resolution stops the current turn before generic model-role dispatch
  • underspecified root targets receive a content-addressed exhaustion certificate, typed backjump, and idempotent durable quarantine
  • credentials remain Keychain-backed and are never persisted or passed in process arguments
  • no candidate, ledger, runtime state, logs, snapshots, caches, weights, model bundles, environment files, or OpenMontage content is included

Test plan

  • exact Architecture 9 interface/remediation regression suite: 237 passed / 9 skipped
  • mandatory local CI: 1,343 passed / 10 skipped; 100% canonical coverage
  • Lean build: 2,793 jobs
  • Python compile and staged/unstaged diff checks
  • authenticated read-only Cursor Strategy smoke outside CI using exact model gpt-5.6-sol
  • all eight GitHub checks green on e8bf5ac
  • diff secret/forbidden-artifact scan

Production fixture coverage

  • stale residency PID reconciliation, dead identity, and PID reuse rejection
  • planning-only to typed remediation without theorem fabrication
  • remediation feasibility, host selection, and provider provenance
  • report provenance plus lease missing/stale/tampered/conflict handling
  • signed certificate issuance/consumption and replay rejection
  • four RH-C1 interface schemas with host-only feasibility and circularity guards
  • complete reliable-source status inventory and stable exhaustion hashing
  • typed root backjump/quarantine and replay idempotency
  • Definition Resolution policy keeps OProver unloaded and Proof Search inaccessible
  • crash/restart/replay/idempotency paths

Production result

Terminal condition B was reached on RH-C1. Cursor gpt-5.6-sol ranked TI-DISTINGUISH-FUNCTIONS, but every registered interface/rewrite schema failed host feasibility. The pinned Mathlib declarations were verified; all other configured sources returned explicit target-bound exhaustion statuses. The resulting exhaustion hash is 243595a4092b60ea5f5bcfb633052321dab5b90b9313666759a79cb5f92045a1; RH-C1 is quarantined at ledger v95 with backjump ROOT_UNAVAILABLE. Proof Search and OProver were never opened. The PR must not be merged automatically.

Made with Cursor

Architecture 9 runtime hardening (dc44e19)

  • reuse flags now derive only from reusable, validated artifact refs bound to the current role, target/context, candidate/plan, ledger/environment, dependency DAG, and content hash; stale or absent refs fail closed with diagnostics
  • benchmark completion now waits with bounded backoff for the exact run ID/generation and terminal report version; transient running is not evaluated, and timeout is typed BENCHMARK_FINALIZATION_TIMEOUT
  • static CI audit rejects hardcoded production *_reused=true claims while classifying and allowing stable schema constants, typed event literals, tests, and fail-closed defaults
  • regressions cover absent/valid/stale/mismatched Critic provenance, delayed completion, typed timeout, failed terminal reports, and concurrent-generation isolation
  • local CI: 1,388 passed / 10 skipped, 100% canonical coverage; Lean build 3,148 jobs; frontend/API checks green
  • production remained stopped and was not restarted; no proof run was launched

Route proof strategy through a host-constrained Cursor adapter, isolate OProver residency behind fail-closed preflight and recovery, and keep MLX streams in one process owner to prevent cross-thread faults.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Jul 26, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

fluffy314 and others added 27 commits July 27, 2026 11:54
Bind Architecture 9 recovery to verified process generations, host-compiled remediation plans, durable provenance, and single-use leases so unelaborated targets cannot reach proof search or OProver.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep TargetContext and Definition Auditor artifacts immutable while binding the downstream remediation selection, preventing certificate provenance from being rewritten after strategy compilation.

Co-authored-by: Cursor <cursoragent@cursor.com>
Treat prior planning-only strategy artifacts as audit history so remediation certificates depend only on current verified upstream evidence.

Co-authored-by: Cursor <cursoragent@cursor.com>
Route a consumed Architecture 9 remediation certificate directly to the host-owned definition gate so generic model roles cannot cross the proof-search boundary.

Co-authored-by: Cursor <cursoragent@cursor.com>
Persist an auditable Definition Resolution transaction when remediation requires an elaborated target, keeping proof search and OProver closed at the Research Contract gate.

Co-authored-by: Cursor <cursoragent@cursor.com>
Search every target-bound host interface and reliable definition source before issuing a content-addressed mathematical terminal blocker, typed backjump, and durable root quarantine.

Co-authored-by: Cursor <cursoragent@cursor.com>
Bind the root to pinned Mathlib declarations and make ROOT_UNAVAILABLE recovery atomic, elaborated, and isolated from quarantined branches.

Co-authored-by: Cursor <cursoragent@cursor.com>
Reset strategy telemetry and proof-plan pointers during root changes so quarantined branch state cannot leak into the new tournament.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep Architecture 9 root bindings intact during supervisor entry and repair interrupted checkpoint overwrites without changing the ledger.

Co-authored-by: Cursor <cursoragent@cursor.com>
Route an accepted Research Contract without an executable typed node back through certified decomposition so model residency cannot begin against the root directly.

Co-authored-by: Cursor <cursoragent@cursor.com>
Apply the subgoal-first transition before the outer blocked-state guard so a persisted Research Contract can resume certified decomposition.

Co-authored-by: Cursor <cursoragent@cursor.com>
Bypass legacy candidate novelty only for fully target-bound Research Contract decomposition resumes, with a typed evidence backjump for the prior misclassification.

Co-authored-by: Cursor <cursoragent@cursor.com>
Rebuild resumed host candidates from the active TargetContext so quarantined RH-C1 data cannot cross into RH-C0 decomposition.

Co-authored-by: Cursor <cursoragent@cursor.com>
Issue the existing target-bound host lease and signed resume certificate before a resumed Architecture-9 worker consumes its checkpoint.

Co-authored-by: Cursor <cursoragent@cursor.com>
Reference the persisted Strategy Tournament artifact from Research Contracts and repair the exact legacy content-hash dependency before certified resume.

Co-authored-by: Cursor <cursoragent@cursor.com>
Launch the certified REPL worker directly so the one-shot resume lease owner PID matches the process that consumes the certificate.

Co-authored-by: Cursor <cursoragent@cursor.com>
Hash the normalized ProofLedger dataclass for resume leases and certificates so supervisor issuance matches REPL consumption exactly.

Co-authored-by: Cursor <cursoragent@cursor.com>
Derive mutable research-goal caches from the formalized ledger root and fail closed on true binding mismatches without discarding accepted contract provenance.

Co-authored-by: Cursor <cursoragent@cursor.com>
Permit crash-safe retry when certificate setup leaves an unconsumed lease whose worker PID no longer exists, while retaining fail-closed conflicts for live owners.

Co-authored-by: Cursor <cursoragent@cursor.com>
Invalidate incompatible executable role artifacts without erasing the accepted strategy tournament and research contract provenance needed for certified retries.

Co-authored-by: Cursor <cursoragent@cursor.com>
Retain the contract's original Definition Auditor dependency under a dedicated provenance role so a fresh typed audit can coexist without breaking the certified artifact DAG.

Co-authored-by: Cursor <cursoragent@cursor.com>
Separate private candidate discovery from proof certification so novel subproblems can be explored without weakening authoritative Lean, ledger, or Judge gates.

Co-authored-by: Cursor <cursoragent@cursor.com>
Treat contract-bound definition resolution as a downstream resume so wrapper candidate drift cannot replace accepted provenance with an empty checkpoint.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replay a content-addressed exhaustion certificate without regenerating private memos or rerunning Strategy, preserving the clean mathematical blocker.

Co-authored-by: Cursor <cursoragent@cursor.com>
Preserve unmappable exploration candidates as typed representation evidence so mapper coverage, semantic rejection, and bounded retries are separated from mathematical failure.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep host-generated representation continuations substantive enough for the supervisor report gate so successful state transitions are not mislabeled as evaluation failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
Version the mapper capability when mathematical notation wraps trusted symbol names so representation reports retain complete, auditable coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
fluffy314 and others added 7 commits July 30, 2026 20:09
Bind three user-authorized RH criteria to independent host plans, selecting only a Lean-validated Jensen quadratic subgoal while preserving Li and Weil blockers as planning-only evidence.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the canonical root hash protected while binding helper-lemma telemetry and artifact indices needed for certified Architecture 9 resume.

Co-authored-by: Cursor <cursoragent@cursor.com>
Bind the runtime wrapper candidate during tournament launch so stale stagnation telemetry cannot replace the selected target-bound plan.

Co-authored-by: Cursor <cursoragent@cursor.com>
Hash the actual supervisor wrapper so certified RH contract resumes are recognized before legacy stagnation handling.

Co-authored-by: Cursor <cursoragent@cursor.com>
Allow an operator Strategy redirect to leave stale BLOCKED state and re-enter the validated tournament-to-contract path.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use the guarded blocked-exit event protocol when an authorized Strategy redirect reopens the validated RH contract.

Co-authored-by: Cursor <cursoragent@cursor.com>
Accept DOI source IDs at the constrained Cursor boundary and persist the verified intent run/hash required by signed resume certificates.

Co-authored-by: Cursor <cursoragent@cursor.com>
fluffy314 and others added 3 commits July 31, 2026 09:13
Derive reuse claims from validated target-bound artifacts and wait for exact benchmark generations to publish terminal reports, preventing stale Critic and transient-running failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
Preserve theorem-local context while redacting only target bodies, classify every bounded OProver and Lean attempt, and gate hardware route certification on reconstructable canaries.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use the hardware-measured prompt and request budgets that preserve exact Lean compilation context without timing out the local Q4 adapter.

Co-authored-by: Cursor <cursoragent@cursor.com>
@FluffyAIcode

Copy link
Copy Markdown
Owner Author

Architecture 9 independent reconstruction follow-up is in commits 772d3a1 and 4113c89.

  • Added source/environment/theorem-bound reconstruction packages that redact only the target proof body while preserving exact project compilation context.
  • Added native OProver prompting, deterministic bounded Pass@K, iterative Lean feedback, robust fenced/plain parsing, isolated exact-project Lean verification, and explicit provider/no-candidate/Lean-rejected/search-exhausted/verified statuses.
  • Added four canaries and mocked tests for context preservation, proof non-leakage, parsing, deterministic attempts, feedback, classification, and source immutability.
  • Q4 hardware acceptance: 4/4 canaries independently verified on attempt 1. Route Pass@2: 2/8 independently verified (riemannHypothesis_of_allJensenHyperbolic, riemannXiGenusOneHadamardRepresentation); 6/8 search exhausted with per-attempt evidence retained. Existing Lean verification remains unchanged and no theorem was invalidated.
  • Measured 45–49k prompt slices timed out at the adapter boundary; 12k bounded slices completed. Full 72–279k Lean compilation prefixes remained intact. Defaults now use the measured 12k/600s bounds.
  • OProver unloaded and Gemma/fleet restored healthy. Production ledger unchanged; no certification signer is configured, and the conditional bridge remains conditional.

All PR checks are green. No merge performed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request needs-mac-m4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant