fix(foresight): minimal corridor self-heal no-wedge stack - #423
Conversation
Endpoint.Sampled sat in allow_indefinite_states with no state_timeout, so a writer session that died — or a server restart that orphaned its in-flight provider call — wedged the endpoint forever, and the diversity-gate barrier never fired because one sibling bundle was never written. Observed live on prod world en-019ed392 (2026-06-16): all 3 endpoint writers hung on their first model call; the run could only continue via hand re-spawn. Mirror Path's Solving/Repaired/Challenged self-heal: a 900s state_timeout on Sampled re-spawns the writer via a new ResumeWriter self-loop action, which shares phase_resteer with the gate's ReSteer (re-spawn with the endpoint's stance + any revision_brief). Budget sits well above a healthy writer (~3 min observed) so a live session is never double-spawned; a late duplicate's BundleWritten no-ops once the endpoint has left Sampled. - specs/endpoint.ioa.toml: drop Sampled from allow_indefinite_states; add the Sampled state_timeout and the ResumeWriter action. - wasm/sample_endpoints: route ReSteer | ResumeWriter -> phase_resteer. - policies/foresight.cedar: permit system-dispatched ResumeWriter on Endpoint. - corridor_engine_contract: pin Sampled self-heal (13 passing; +1). Host tests 12/12; contract suite 13/13. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
) Add World.Active ResumeWorldCascade and Endpoint.UnderRepair ResumeEndpointScoring state_timeouts with aggregate_costs handlers. Re-running world_cascade when all claims are terminal but canonical_path_id is unset prevents the en-019ed392 wedge; endpoint scoring self-heal covers missed ScoreComplete dispatches. Contract tests 3/3 pass.
|
CI note: initial GitHub |
|
CI/deploy-readiness update: rerun passed. PR #423 is now Per orchestration, Codex/provider auth is intentionally held until the other lanes are ready for a meaningful live Foresight run. This PR is code/CI ready for review/deploy planning; final canonical e2e should wait until Lane 2 + Lane 3 are landed/deployed and fresh Codex auth is requested then. |
|
ARN-65 post-merge status:
|
Summary
Minimal ARN-65 / Lane 3 no-wedge reliability stack against
main.This intentionally does not replace or force-push over PR #422 (
codex/searched-corridor). #422 remains the broad searched-corridor handoff and is currently conflicting because it carries broad active branch history. This PR is the non-destructive, mergeable narrow self-heal path.Scope:
Endpoint.Sampled -> ResumeWriterself-heal for dead/orphaned endpoint writers.Endpoint.UnderRepair -> ResumeEndpointScoringself-heal for terminal claims that never scored.World.Active -> ResumeWorldCascadeself-heal for terminal claims with unsetcanonical_path_id.World.Seeding -> ResumeSeedself-heal for missed/stalledSeedComplete.Files
crates/temperpaw/tests/corridor_engine_contract.rsos-apps/paw-foresight/policies/foresight.cedaros-apps/paw-foresight/specs/endpoint.ioa.tomlos-apps/paw-foresight/specs/model.csdl.xmlos-apps/paw-foresight/specs/world.ioa.tomlos-apps/paw-foresight/wasm/aggregate_costs/src/lib.rsos-apps/paw-foresight/wasm/sample_endpoints/src/lib.rsMerge-State Diagnosis
PR #422 is
mergeable=CONFLICTINGbecausecodex/searched-corridorcarries broad searched-corridor history whilemainhas overlapping corridor/platform changes. A safe minimal replay ontoorigin/mainhad only one mechanical conflict in the corridor contract test placement; this branch preservesmain's packaging test and appends the self-heal contracts.Current PR #423 state:
mergeable=MERGEABLE; GitHub checks queued at time of opening.Verification
Fresh proof rerun on pushed branch
codex/arn-65-minimal-self-heal:cargo test -p temperpaw --test corridor_engine_contractpassed 17/17.cargo build -p temperpawpassed.cargo build --manifest-path os-apps/paw-foresight/wasm/sample_endpoints/Cargo.toml --target wasm32-unknown-unknown --release --lockedpassed.cargo build --manifest-path os-apps/paw-foresight/wasm/aggregate_costs/Cargo.toml --target wasm32-unknown-unknown --release --lockedpassed.cargo build --manifest-path os-apps/paw-foresight/wasm/seed_world/Cargo.toml --target wasm32-unknown-unknown --release --lockedpassed.Canonical E2E Plan
Current canonical target after Lane 4: Railway
foresightdeployment55c673b1-1aa2-455f-befe-065b35683e70onPostgres-v79y;/readyzis ready.After deploy/install of this PR to
foresight, run:Needed for live proof: deployment/install authorization and a live
FORESIGHT_API_KEY/model/provider choice. Unauthenticated/paw/versionreturns 401.