fix: research unblock adapters after #75/#76 (bench def + progress merge) - #77
Merged
Merged
Conversation
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
marked this pull request as ready for review
September 8, 2026 18:40
jkbennitt
commented
Sep 8, 2026
jkbennitt
left a comment
Member
Author
There was a problem hiding this comment.
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
#75 seeded a built
SimpleResearchBenchat(128, 0, 136)and queuedcurrentProj=Smithing. #76 pin-matches native AppData beforegame/load. Re-smoke after #76 still hadresearch_bench_present: Falseandresearch_target Smithinglocked (misleading “bench/prereqs” text). The save was correct; RLE adapters were not.RCA (verified against RIMAPI DTOs)
BuildingDto uses snake_case
def._building_def_nameonly readdef_namethenlabel→"simple research bench".is_research_bench_defstripped_only, so spaces broke theresearchbenchsubstring match. The seeded bench was dropped from the 50-structure sample / brief flag.get_research()only read/research/summary. That DTO has counts +by_tech_levelbags, notcurrent_project. The adapter treated any tech level withfinished > 0as entirely completed, then truncated tofinished_projects_count. Medieval (incl. Smithing) landed incompleted, got truncated out ofavailable, and the fix: unblock Crashlanded research scoring (seed bench + brief observability) #75 validator reportedlocked. Seeded Smithing never hit the already-satisfied path.Live shapes (IlyaChichkov/RIMAPI):
BuildingDto.Def/Label;/research/progressisResearchProjectDto(name,progress_percent);/research/finishedisfinished_projects;/research/treehasis_finished/can_start_now.What landed
def→def_name→label.is_research_bench_def./research/progress(current + percent) with/research/finished+/research/treeso tick0currentcan be Smithing andavailable/completedare honest (can_start_now, not by-tech-level bags).current_projectstill pass through; missing extra endpoints are optional.Tests (unit only)
deffield → bench matcher true;get_mapkeepsSimpleResearchBenchwhen live JSON usesdef+ spacey label."simple research bench") matches.current, notlocked).Out of scope
SCORING_VERSIONbump