Repository navigation
OpenConceptLab/ocl_issues#2906 | Start a new target on its latest semantic-search release, and mark each version - #101
Merged
snyaggarwal merged 2 commits intoOct 15, 2026
Conversation
…antic-search release, and mark each version Choosing a target repository now fills Version with its latest release that supports semantic search (match_algorithms includes llm), else its latest release, else HEAD. Before, Version stayed empty unless the repository had a single version or a single release. A saved project, or a copy made from one, keeps its saved version and never gets the default. A saved URL without a version means HEAD, since HEAD's version_url carries none. A versions response that arrives after another repository was chosen is ignored, so it can't set that repository's version. Each version option shows its release date and "Latest" and "Semantic search" badges. OCL keeps no release timestamp, so the date is created_on, which is also what OCL orders versions by. Version turns red only after a save is tried without one, and choosing a version clears it. Save & Close no longer waits for a version, so that try can happen from the form too; the save itself still refuses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HgMg6pPngQoQJzZToPti27
paynejd
commented
Oct 14, 2026
paynejd
left a comment
Member
Author
There was a problem hiding this comment.
Codex review, pass 1 (codex-cli 0.162.1, commit 6dbf9ef)
1 P2.
- F1.1 · P2 · src/components/map-projects/MapProject.jsx:2846 · Default selection considers only the first page of versions, so it can miss the required semantic-search release. (The versions endpoint defaults to 25 results. If the newest 25 releases lack llm but an older release supports it, this request ignores subsequent pages and automatically selects the newest non-semantic release. This violates acceptance criterion 1 and leaves the semantic algorithm unavailable despite an eligible release existing.)
findings.json
{
"reviewer": "codex-cli 0.162.1",
"perspective": "defects",
"mode": "full",
"commit": "6dbf9efbc2bff8abfafb13e83bc5b9718dadf842",
"verdict": "findings",
"prior": [],
"findings": [
{
"id": "F1.1",
"severity": "P2",
"tag": null,
"file": "src/components/map-projects/MapProject.jsx",
"line": 2846,
"claim": "Default selection considers only the first page of versions, so it can miss the required semantic-search release.",
"scenario": "The versions endpoint defaults to 25 results. If the newest 25 releases lack llm but an older release supports it, this request ignores subsequent pages and automatically selects the newest non-semantic release. This violates acceptance criterion 1 and leaves the semantic algorithm unavailable despite an eligible release existing.",
"action": "Follow pagination before applying the fallback selection, retaining the stale-request guard, and add a regression test with an eligible release on page two.",
"lines_delta": null,
"confidence": "high"
}
]
}
Member
Author
|
Response to Codex pass 1
No P0 or P1 is open, so the Codex loop stops at pass 1. |
paynejd
commented
Oct 14, 2026
paynejd
left a comment
Member
Author
There was a problem hiding this comment.
Simplification review (commit 6dbf9ef)
4 item(s).
- S1 · reuse · src/components/map-projects/projectTargetRepo.js:9 · supportsSemanticSearch (lines 9-11) duplicates isLLMBridgeRepoVersion two lines above it (projectTargetRepo.js:7). Both check version?.match_algorithms?.includes('llm'). The Boolean() wrap changes nothing, because both call sites only test truthiness: the find at line 22 and the if at line 38. No test calls the function directly. → Delete supportsSemanticSearch and its comment. Call isLLMBridgeRepoVersion (src/components/map-projects/projectTargetRepo.js:7) at lines 22 and 38. Move the one-line comment above line 7 if you want to keep it. (-3)
- S2 · yagni · src/components/map-projects/ConfigurationForm.jsx:64 · VERSION_BADGE_LABELS is a lookup table with one caller (line 256). Its only job is to turn the tokens returned by getTargetRepoVersionBadges ('latest', 'semantic_search') into i18n keys, so the tokens are an extra layer with a single consumer. → Have getTargetRepoVersionBadges push the i18n keys directly ('common.latest', 'map_project.semantic_search'), use .map(key => t(key)) at line 256, and make the two badge tests expect the keys. src/components/map-projects/rowProgress.js already builds i18n keys in a pure module, so there is a precedent. (-5)
- S3 · dup-test · src/components/map-projects/tests/projectTargetRepo.test.js:59 · The test 'getDefaultTargetRepoVersion picks the latest release that supports semantic search' repeats 'skips a newer release without semantic search' (line 63). In LOINC_VERSIONS the only semantic release is also the newest release, so this test cannot tell the semantic preference apart from simply taking the latest release. A mutant that returns versions[0] passes it. In a mutation run on a scratch copy, the line-63 test also killed every mutant this test killed. → Nothing replaces it. Keep LOINC_VERSIONS, which the saved-version, badge and release-date tests still use. (-4)
- S4 · dup-test · src/components/map-projects/tests/projectTargetRepo.test.js:113 · The first two assertions of 'getLatestReleasedTargetRepoVersion takes the first release the API lists' (lines 113-114) test an internal helper whose behaviour the public tests already pin. The badge test at line 118 fixes which version is latest. The badge test for 'nothing is released' and the HEAD-fallback test at line 82 cover the case with no release. In the scratch mutation run, every mutant these two assertions killed also failed one of those tests. Only the undefined assertion at line 115 is unique, because it alone pins the Array.isArray guard. → Delete lines 113-114 and keep line 115. (-2)
findings.json
{
"reviewer": "claude subagent",
"perspective": "simplify",
"mode": "full",
"commit": "6dbf9efbc2bff8abfafb13e83bc5b9718dadf842",
"verdict": "findings",
"prior": [],
"findings": [
{
"id": "S1",
"severity": null,
"tag": "reuse",
"file": "src/components/map-projects/projectTargetRepo.js",
"line": 9,
"claim": "supportsSemanticSearch (lines 9-11) duplicates isLLMBridgeRepoVersion two lines above it (projectTargetRepo.js:7). Both check version?.match_algorithms?.includes('llm'). The Boolean() wrap changes nothing, because both call sites only test truthiness: the find at line 22 and the if at line 38. No test calls the function directly.",
"scenario": null,
"action": "Delete supportsSemanticSearch and its comment. Call isLLMBridgeRepoVersion (src/components/map-projects/projectTargetRepo.js:7) at lines 22 and 38. Move the one-line comment above line 7 if you want to keep it.",
"lines_delta": -3,
"confidence": "high"
},
{
"id": "S2",
"severity": null,
"tag": "yagni",
"file": "src/components/map-projects/ConfigurationForm.jsx",
"line": 64,
"claim": "VERSION_BADGE_LABELS is a lookup table with one caller (line 256). Its only job is to turn the tokens returned by getTargetRepoVersionBadges ('latest', 'semantic_search') into i18n keys, so the tokens are an extra layer with a single consumer.",
"scenario": null,
"action": "Have getTargetRepoVersionBadges push the i18n keys directly ('common.latest', 'map_project.semantic_search'), use .map(key => t(key)) at line 256, and make the two badge tests expect the keys. src/components/map-projects/rowProgress.js already builds i18n keys in a pure module, so there is a precedent.",
"lines_delta": -5,
"confidence": "medium"
},
{
"id": "S3",
"severity": null,
"tag": "dup-test",
"file": "src/components/map-projects/__tests__/projectTargetRepo.test.js",
"line": 59,
"claim": "The test 'getDefaultTargetRepoVersion picks the latest release that supports semantic search' repeats 'skips a newer release without semantic search' (line 63). In LOINC_VERSIONS the only semantic release is also the newest release, so this test cannot tell the semantic preference apart from simply taking the latest release. A mutant that returns versions[0] passes it. In a mutation run on a scratch copy, the line-63 test also killed every mutant this test killed.",
"scenario": null,
"action": "Nothing replaces it. Keep LOINC_VERSIONS, which the saved-version, badge and release-date tests still use.",
"lines_delta": -4,
"confidence": "high"
},
{
"id": "S4",
"severity": null,
"tag": "dup-test",
"file": "src/components/map-projects/__tests__/projectTargetRepo.test.js",
"line": 113,
"claim": "The first two assertions of 'getLatestReleasedTargetRepoVersion takes the first release the API lists' (lines 113-114) test an internal helper whose behaviour the public tests already pin. The badge test at line 118 fixes which version is latest. The badge test for 'nothing is released' and the HEAD-fallback test at line 82 cover the case with no release. In the scratch mutation run, every mutant these two assertions killed also failed one of those tests. Only the undefined assertion at line 115 is unique, because it alone pins the Array.isArray guard.",
"scenario": null,
"action": "Delete lines 113-114 and keep line 115.",
"lines_delta": -2,
"confidence": "medium"
}
]
}…the badges name their i18n keys From the simplification review: supportsSemanticSearch repeated isLLMBridgeRepoVersion, so the target helpers call that instead. getTargetRepoVersionBadges returns the badges' i18n keys, which drops the form's lookup table. Two tests repeated others: the LOINC default test can't tell the semantic preference from taking the latest release, and the latest-release assertions are pinned by the badge tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HgMg6pPngQoQJzZToPti27
Member
Author
|
Response to the simplification review After the cuts, the full test gate passes again: the secret check, |
paynejd
commented
Oct 14, 2026
paynejd
left a comment
Member
Author
There was a problem hiding this comment.
Codex check of the cuts (commit ee9c85e)
Clean.
findings.json
{
"reviewer": "codex-cli 0.162.1",
"perspective": "defects",
"mode": "cuts",
"commit": "ee9c85eeff08bf7620ace8c575b58e4b7ceb6e7b",
"verdict": "clean",
"prior": [],
"findings": []
}
snyaggarwal
approved these changes
Oct 15, 2026
snyaggarwal
deleted the
OpenConceptLab/ocl_issues#2906-default-repo-version
branch
October 15, 2026 02:39
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.
What changed and why
After you chose a target repository, Version stayed empty and turned red at once. Its options were bare IDs, with no dates, no "latest" mark, and no sign of which versions support the OCL Semantic Algorithm.
match_algorithmsincludesllm), else its latest release, else HEAD. "Latest" means the first release the API lists. The API lists versions newest first (-created_at), the same order OCL uses for a repository's latest released version. Before, Version filled only when the repository had a single version or a single release.target_repo_urlwithout a version means HEAD, because HEAD'sversion_urlcarries none. If the saved version is no longer listed, Version stays empty rather than switching to another one.RepoVersionSearchAutocompletegains an optionalgetOptionBadgesprop; the bridge version picker doesn't pass it and is unchanged.created_on. OCL keeps no release timestamp.revision_dateis copied from HEAD when a version is created, so it can repeat across versions.updated_onmoves with later edits, such as vectorizing a version for semantic search.created_onis what OCL orders versions by, so the "Latest" release always shows the newest date.map_project.semantic_search,map_project.version_released_on, andmap_project.target_repo_version_required. That last key was already used but existed only as a default string in the code. "Latest" reusescommon.latest.How I tested it
The steps of
.github/workflows/pr.yml, in order, on Node 22.23.2:start-prod.shsecret-variable check: passes.npm ci: passes.src --ext .jsx,.js: no problems. I ran it with--no-eslintrc -c .eslintrc.json, because my checkout sits inside another checkout of this repo, and ESLint would otherwise load that one's identical config too. CI's checkout isn't nested, so it sees the same single config.npm run test:all: 467 unit and 6 integration tests pass.The PR's own "Lint and test" check passed on ee9c85e: https://github.com/OpenConceptLab/oclmap/actions/runs/38600715953
New unit tests, in
src/components/map-projects/__tests__/projectTargetRepo.test.js:getDefaultTargetRepoVersion: skips a newer release without semantic search; falls back to the latest release, then to HEAD; stays unset with no release and no HEAD. These replace the old tests that expected Version to stay empty when several choices remained.getSavedTargetRepoVersion: keeps a saved older release over the default; reads a blank saved version as HEAD; stays unset when the saved version is gone.getTargetRepoVersionBadgesandgetTargetRepoVersionReleaseDate, on the ticket's LOINC versions, plusgetLatestReleasedTargetRepoVersionwithout a versions list.These fail on
main, where the helpers don't exist or behave the old way.In the browser. I built the app with webpack in development mode against a local mock of the OCL API, so there was no production traffic. I drove it with headless Chromium in a fresh context, at 1440×1000 and at 1024×1000; the ticket names no widths. The mock serves LOINC with 2.81 (released, semantic search), 2.71.21AA and 2.70.21AA (released) and HEAD. It also serves a repository with no release, a repository whose versions answer after 2.5 seconds, and three saved projects. All 15 checks pass at both widths on the final commit, with no page errors:
/orgs/Regenstrief/sources/LOINC/2.70.21AA/.target_repo) opens on HEAD.Acceptance criteria
getDefaultTargetRepoVersiontests, plus the browser checks for LOINC → 2.81 and for a repository with no release → HEAD.getTargetRepoVersionBadgesandgetTargetRepoVersionReleaseDatetests, plus the browser options above. HEAD and unreleased versions show no date, since they have no release.getSavedTargetRepoVersiontests, plus the browser checks for the projects saved on 2.70.21AA and on HEAD.Review
Nothing is open at P0 or P1.
Docs
None needed. No doc describes the version picker; the code comments beside the changed helpers say what they do now.
Not done, by choice
Noticed, not fixed
versions/?verbose=trueis requested without a limit, so the API returns its default first page (25 versions, newest first). A repository with more versions can't list its older ones. A project saved on one of those opens with Version empty, and HEAD, the oldest, may be missing from the list.$matchlooks like it resolves atarget_repo_urlwithout a version to the repository's latest release, not HEAD (resolve_repoin oclapi2). Choosing HEAD sends HEAD's versionlessversion_url, so a project on HEAD may be matched against the latest release when one exists. It doesn't affect this change's default, which picks HEAD only when nothing is released. I didn't test it against the API.closes OpenConceptLab/ocl_issues#2906
🤖 Generated with Claude Code
https://claude.ai/code/session_01HgMg6pPngQoQJzZToPti27
Written by an Octoad session worker (worker-v0.11, recipe lean-loop, flow public>public, run openconceptlab-ocl-issues-2906-20261014-120733).