Skip to content

fix: research unblock adapters after #75/#76 (bench def + progress merge) - #77

Merged
jkbennitt merged 2 commits into
masterfrom
cursor/research-unblock-adapters-6234
Sep 8, 2026
Merged

fix: research unblock adapters after #75/#76 (bench def + progress merge)#77
jkbennitt merged 2 commits into
masterfrom
cursor/research-unblock-adapters-6234

Conversation

@jkbennitt

Copy link
Copy Markdown
Member

Why

#75 seeded a built SimpleResearchBench at (128, 0, 136) and queued currentProj=Smithing. #76 pin-matches native AppData before game/load. Re-smoke after #76 still had research_bench_present: False and research_target Smithing locked (misleading “bench/prereqs” text). The save was correct; RLE adapters were not.

RCA (verified against RIMAPI DTOs)

  1. BuildingDto uses snake_case def. _building_def_name only read def_name then label"simple research bench". is_research_bench_def stripped _ only, so spaces broke the researchbench substring match. The seeded bench was dropped from the 50-structure sample / brief flag.

  2. get_research() only read /research/summary. That DTO has counts + by_tech_level bags, not current_project. The adapter treated any tech level with finished > 0 as entirely completed, then truncated to finished_projects_count. Medieval (incl. Smithing) landed in completed, got truncated out of available, and the fix: unblock Crashlanded research scoring (seed bench + brief observability) #75 validator reported locked. Seeded Smithing never hit the already-satisfied path.

Live shapes (IlyaChichkov/RIMAPI): BuildingDto.Def / Label; /research/progress is ResearchProjectDto (name, progress_percent); /research/finished is finished_projects; /research/tree has is_finished / can_start_now.

What landed

  • Map building field defdef_namelabel.
  • Strip spaces (and keep underscore strip) in is_research_bench_def.
  • Merge /research/progress (current + percent) with /research/finished + /research/tree so tick0 current can be Smithing and available/completed are honest (can_start_now, not by-tech-level bags).
  • Drop the broken summary bucketing. Mock payloads that already have current_project still pass through; missing extra endpoints are optional.

Tests (unit only)

  • Building def field → bench matcher true; get_map keeps SimpleResearchBench when live JSON uses def + spacey label.
  • Spacey label ("simple research bench") matches.
  • Progress merge exposes current Smithing; available/locked/finished status is honest (Smithing is current, not locked).

Out of scope

  • No scenario-save re-seed
  • No scoring formula / SCORING_VERSION bump
  • No matrix, smoke, or billed model/cal runs
Open in Web Open in Cursor 

cursoragent and others added 2 commits September 8, 2026 18:36
Post-#76 native pin-match still reported research_bench_present false
and research_target Smithing locked. Live buildings use snake_case def
(label fallback has spaces); /research/summary has no current project
and by-tech-level bucketing dropped Smithing from available.

Map def → def_name → label, strip spaces in the bench matcher, and
merge /research/progress + finished + tree so current can be Smithing.

Co-authored-by: Jason <jkbennitt@users.noreply.github.com>
Move the post-#76 adapter tests into their own class so the existing
read-endpoint cases stay under TestReadEndpoints.

Co-authored-by: Jason <jkbennitt@users.noreply.github.com>
@jkbennitt
jkbennitt marked this pull request as ready for review September 8, 2026 18:40

@jkbennitt jkbennitt left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — RCA matches the post-#75/#76 smoke miss: BuildingDto def (+ spacey label strip) so SimpleResearchBench stays in the sample/brief; research adapter merges /progress+/finished+/tree instead of broken by-tech-level summary bucketing so Smithing is current not locked. Unit tests cover live def, spacey label, progress merge + research_target_status. No scoring/save re-seed/matrix. All five CI SUCCESS on 84660a4 (run 34264192479). HOLD merge for CoS clear; plain squash (no --admin).

@jkbennitt
jkbennitt merged commit d0de6c6 into master Sep 8, 2026
5 checks passed
@jkbennitt
jkbennitt deleted the cursor/research-unblock-adapters-6234 branch September 8, 2026 18:42
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