Skip to content

fix: preflight gates so keeper Crashlanded failures are not model noise - #72

Merged
jkbennitt merged 2 commits into
masterfrom
cursor/preflight-contract-gates-ddde
Sep 7, 2026
Merged

fix: preflight gates so keeper Crashlanded failures are not model noise#72
jkbennitt merged 2 commits into
masterfrom
cursor/preflight-contract-gates-ddde

Conversation

@jkbennitt

@jkbennitt jkbennitt commented Sep 7, 2026

Copy link
Copy Markdown
Member

Jason-cleared RLE-side contract/preflight fixes. These five Crashlanded keeper failures were being scored as model noise; they are dispatch/catalog bugs, not Ilya develop gaps.

Gates

  1. Farm / growing zone already-satisfied — overlapping recreate is success-by-state. Uses POST /api/v1/builder/check-zone (plus in-memory overlap and engine “already covers” messages) instead of retrying create.
  2. Work-priority schema — briefs/MCP no longer advertise id/priority as the payload. id/priority are never treated as WorkTypeDef names. Accepts work / work_type / skill + priority. Names validated against /api/v1/work-list (vanilla fallback).
  3. Research availability — only queue projects in research.available. Finished and locked fail before the write. Re-targeting the current project is allowed (it is available).
  4. Doctor + patienttend requires a distinct living doctor/patient pair (doctor_pawn_id + patient id).
  5. Stockpile-delete — quarantined: hidden from briefs/MCP tools and refused at dispatch (endpoint missing on the deployed DLL).

Approach

Harness-agnostic preflight in rle.orchestration.preflight, called from ActionExecutor (game loop and MCP both pass GameState). Catalog/brief/tool schemas updated where id/priority or stockpile_delete were advertised.

Tests

Unit coverage for each gate in tests/unit/test_preflight.py. Full local suite: 710 passed. ruff + mypy + harness boundary clean.

No N>1 runs and no baseline calibration.

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 7, 2026 22:30
…model noise

Treat already-covered growing zones as success-by-state (check-zone / engine).
Validate work_priority against WorkTypeDef names and stop sending id/priority
as work types. Queue only available research. Require a living doctor/patient
pair before tend. Hide and refuse stockpile_delete when the endpoint is missing.

Co-authored-by: Jason <jkbennitt@users.noreply.github.com>
…search

Felix integration fixtures emit {"skill": "growing", "priority": 1}. Treat
skill as a WorkTypeDef alias. Re-queueing the current research project is
allowed (it is available); only finished and locked projects are blocked.

Co-authored-by: Jason <jkbennitt@users.noreply.github.com>
@jkbennitt
jkbennitt marked this pull request as ready for review September 7, 2026 22:32
@jkbennitt
jkbennitt merged commit e7eb120 into master Sep 7, 2026
5 checks passed
@jkbennitt
jkbennitt deleted the cursor/preflight-contract-gates-ddde branch September 7, 2026 22:34
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.

2 participants