Repository navigation
Conversation
…urces list once, shared by the bridge probe and the target The bridge probe re-ran on every project change and the target version read the same list again. Both now read through one reader that keeps each page's request for the open project, so a version's list is read once, and a page that fails is read again on the next ask. The probe runs again only when the bridge algorithm, its repository or version, whether it's selected, or the namespace changes, and a selected bridge algorithm still pins its resolved version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qVXohXhqMLGigP4RHV
… list, and retry transient failures Read the list pages and resolve the bridge version in APIService's raw mode, so a throttled read settles and isn't kept. A repository's HEAD is one version at its own URL or at HEAD/. A network error or a 5xx on a page or on $resolveReference is tried again twice, so a passing failure no longer leaves the bridge off until the page reloads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qVXohXhqMLGigP4RHV
|
Codex review, pass 1 (codex-cli 0.169.0, commit e51bd6d) Verdict: findings (3 finding(s)).
findings.json{
"reviewer": "codex-cli 0.169.0",
"perspective": "defects",
"mode": "full",
"commit": "e51bd6d8441588ef83ecb54b053f84d8d40329fd",
"verdict": "findings",
"prior": [],
"findings": [
{
"id": "F1.1",
"severity": "P1",
"tag": null,
"file": "src/components/map-projects/MapProject.jsx",
"line": 157,
"claim": "A throttled mapped-sources page stays in the cache as a promise that never settles.",
"scenario": "The API returns HTTP 429 for a target version's first page. After the throttle expires, the user switches versions and switches back. The reader still returns the original pending promise, so the source list stays empty and no new request is sent. Before this change, reselecting the version sent a fresh request.",
"action": "Use APIService's raw response mode for this GET so a 429 settles and the reader can evict the failed page. Add a regression test that reselects the version after throttling.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F1.2",
"severity": "P2",
"tag": null,
"file": "src/components/map-projects/mappedSources.js",
"line": 38,
"claim": "The target and bridge still read the same HEAD list twice because they use different cache keys.",
"scenario": "A project targets the HEAD of a source with no releases, and its bridge resolves to that same HEAD. The target gets the bare source URL from the versions API, while the bridge appends `HEAD/`. Both endpoints read the same HEAD mappings, but the reader fetches every page through each URL.",
"action": "Normalize the bare source path and its explicit `HEAD/` path to the same cache key. Add a test that passes the bare path through the target reader and resolves the bridge to HEAD.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F1.3",
"severity": "P2",
"tag": null,
"file": "src/components/map-projects/MapProject.jsx",
"line": 890,
"claim": "A transient failure resolving the offered bridge leaves it disabled after the API recovers.",
"scenario": "The first `$resolveReference` request for an unselected bridge returns HTTP 503. The probe gets an empty version, so Bridge Match never mounts and the bridge option stays disabled. Saving the project after recovery used to retry the probe. Now a save with the same namespace leaves the option disabled until the user reloads or changes a probe input.",
"action": "Distinguish transient HTTP failures from a successful response with no resolved version, and retry transient failures within the active probe while preserving cancellation.",
"lines_delta": null,
"confidence": "high"
}
]
} |
|
Pass 1 replies (fixed in c6df4d7)
|
…id, and retry a page only while a read waits for it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qVXohXhqMLGigP4RHV
|
Codex review, pass 2 (codex-cli 0.169.0, commit c6df4d7) Verdict: findings (3 finding(s)).
findings.json{
"reviewer": "codex-cli 0.169.0",
"perspective": "defects",
"mode": "verify",
"commit": "c6df4d7a6958a0f4c4698cdc6e6e7dd71b0898e9",
"verdict": "findings",
"prior": [
{
"id": "F1.1",
"status": "resolved"
},
{
"id": "F1.2",
"status": "resolved"
},
{
"id": "F1.3",
"status": "unresolved"
}
],
"findings": [
{
"id": "F2.1",
"severity": "P2",
"tag": null,
"file": "src/components/map-projects/mappedSources.js",
"line": 89,
"claim": "The offered bridge stays disabled if the resolver recovers after the retry window.",
"scenario": "A 30-second API outage makes the initial $resolveReference call and both retries return 503. After recovery, saving the project with the same bridge inputs no longer retries the probe. The bridge option stays disabled until the user reloads or changes a probe input.",
"action": "Give a failed bridge probe a retry path that works with unchanged inputs, while keeping successful probes independent of saves.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F2.2",
"severity": "P2",
"tag": null,
"file": "src/components/map-projects/mappedSources.js",
"line": 81,
"claim": "The target and bridge still fetch the same version twice when its ID is percent-encoded in the API URL.",
"scenario": "A source has a version named v1@build. The target uses the encoded version_url from the API, while the bridge builds a path from the raw version ID. Both paths address the same version, but the reader treats them as different keys and requests every page twice.",
"action": "Use the API's canonical version URL for bridge reads or key both callers by repository identity and version ID. Cover both resolved and pinned bridges.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F2.3",
"severity": "P2",
"tag": null,
"file": "src/components/map-projects/mappedSources.js",
"line": 43,
"claim": "A mapped-sources page can retry after its last caller has stopped.",
"scenario": "A bridge page returns 503 and the user opens another project before the retry timer fires. The old project's retry still runs. If it receives 429, the global throttle overlay blocks the new project even though it never requested that page.",
"action": "Stop page retries when no active caller still needs the page, and stop the target's read when the project unmounts.",
"lines_delta": null,
"confidence": "high"
}
]
} |
|
Pass 2 replies (fixes in 43cdd28)
|
… bare id, and start no read from a versions answer after leaving Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qVXohXhqMLGigP4RHV
|
Codex review, pass 3 (codex-cli 0.169.0, commit 43cdd28) Verdict: findings (2 finding(s)).
findings.json{
"reviewer": "codex-cli 0.169.0",
"perspective": "defects",
"mode": "verify",
"commit": "43cdd28af21bba4329a25fa345f7d5509ce269be",
"verdict": "findings",
"prior": [
{
"id": "F1.1",
"status": "resolved"
},
{
"id": "F1.2",
"status": "resolved"
},
{
"id": "F1.3",
"status": "unresolved"
},
{
"id": "F2.1",
"status": "unresolved"
},
{
"id": "F2.2",
"status": "unresolved"
},
{
"id": "F2.3",
"status": "unresolved"
}
],
"findings": [
{
"id": "F3.1",
"severity": "P2",
"tag": null,
"file": "src/components/map-projects/mappedSources.js",
"line": 39,
"claim": "The target and bridge still fetch the same version twice when OCL returns a double-encoded version URL.",
"scenario": "The target and bridge both use version `v1@build`. OCL returns `v1%2540build` in `version_url`, while the bridge builds its path from `v1@build`. One decode leaves the target key as `v1%40build`, so both callers fetch every page. The new test supplies the single-encoded URL and misses this case.",
"action": "Use the API's version URL for both reads, including for pinned bridge versions, and test with the double-encoded URL OCL returns.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F3.2",
"severity": "P2",
"tag": null,
"file": "src/components/map-projects/MapProject.jsx",
"line": 3034,
"claim": "A late versions response can restart mapped-sources retries after the project has unmounted.",
"scenario": "A bridge page returns 503 while the target's versions request is pending. The user opens another project, and cleanup removes the bridge waiter. If the old versions response arrives before the retry timer fires, it registers a target waiter after cleanup. The old page retries, and a 429 can open the global throttle overlay over the new project.",
"action": "Check the existing mounted ref in the versions callback before starting a target read. Test a versions response that arrives after unmount while a shared page is waiting to retry.",
"lines_delta": null,
"confidence": "high"
}
]
} |
|
Pass 3 replies (fixes in d39cd64). No P0 or P1 open after 3 passes, so the defect passes stop here. Pass 3 lists F2.2 and F2.3 as unresolved because F3.1 and F3.2 found a case each that their fixes missed. Both are fixed below.
|
…ersion-id decoding Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qVXohXhqMLGigP4RHV
|
Simplification review (Claude subagent, Sonnet 5.5, commit d39cd64): 3 items.
Tests rerun after the cuts: 719 unit and 13 integration pass, ESLint clean. simplify.json{
"reviewer": "claude subagent",
"perspective": "simplify",
"mode": "full",
"commit": "d39cd6407c7c9201c1b3f39ef40f772fe1129968",
"verdict": "findings",
"prior": [],
"findings": [
{
"id": "S1",
"severity": null,
"tag": "shrink",
"file": "src/components/map-projects/mappedSources.js",
"line": 16,
"claim": "withRetry destructures isCancelled out of its options and then puts it back, so the destructure does nothing.",
"action": "Write `const withRetry = (request, options) => retryWithBackoff(() => Promise.resolve(request()).then(...), {...options, isRetryable: isTransientFailure}).catch(() => null)`.",
"lines_delta": -1,
"confidence": "high"
},
{
"id": "S2",
"severity": null,
"tag": "shrink",
"file": "src/components/map-projects/mappedSources.js",
"line": 24,
"claim": "The decoded() loop has a try/catch, a next-equals-value check and a counter capped at 3. Pass 3 (F3.1) only needs it to decode twice-encoded ids.",
"action": "Loop with a plain `try { for(let i=0;i<2;i++) value = decodeURIComponent(value) } catch {}`. Decoding an already-decoded value with no '%' is a no-op, so the equality break isn't needed.",
"lines_delta": -6,
"confidence": "medium"
},
{
"id": "S3",
"severity": null,
"tag": "dup-test",
"file": "src/components/map-projects/__tests__/mappedSources.test.js",
"line": 300,
"claim": "The last test is a block of source-text regex asserts. Several only restate code: the `bridgeNamespace` const line, `readMappedSources,\\n`, the single mapped-sources appendToUrl count, and the raw-mode `, true)` regexes. They break on formatting changes and add little beyond the dependency-list test. The `isMountedRef` and unmount-cleanup asserts are the ones that pin the pass 2 and 3 fixes, so keep those.",
"action": "Keep the createMappedSourcesReader and readMappedSources call-site checks plus the isMountedRef and unmount-effect regexes. Drop the bridgeNamespace line regex, the `readMappedSources,\\n` regex and the appendToUrl count regex.",
"lines_delta": -4,
"confidence": "low"
}
]
} |
… encoded id never shares a read with the bare id Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qVXohXhqMLGigP4RHV
|
Codex check of commits 43cdd28..812147c (codex-cli 0.169.0, commit 812147c) Verdict: findings (1 finding(s)).
findings.json{
"reviewer": "codex-cli 0.169.0",
"perspective": "defects",
"mode": "final",
"commit": "812147c891c264363ab0a1152125a011fe796cf3",
"verdict": "findings",
"prior": [],
"findings": [
{
"id": "FC.1",
"severity": "P2",
"tag": null,
"file": "src/components/map-projects/mappedSources.js",
"line": 33,
"claim": "Decoding twice gives the raw bridge URL and the canonical target URL the same cache key even when OCL resolves them to different versions.",
"scenario": "Select version `1.2.3+build.1` for both the bridge and the target. If the bridge requests the raw `+` URL first and the target joins while it is pending, OCL interprets the raw `+` as a space. When that version is absent, both callers receive an empty mapped-sources list after the bridge's 404. At 43cdd28 the target issued its own request using `%252B` and received the correct list.",
"action": "Use the API's canonical version URL for bridge reads before sharing cache entries. Add a regression test with a `+` build suffix and the bridge request starting first.",
"lines_delta": null,
"confidence": "high"
}
]
}Reply (fixed in 1117b0d)
|
|
Codex check of commit 1117b0d (codex-cli 0.169.0, commit 1117b0d) Verdict: clean (0 finding(s)).
findings.json{
"reviewer": "codex-cli 0.169.0",
"perspective": "defects",
"mode": "final",
"commit": "1117b0d0aaab1c636f1615215d94371ccfcaea45",
"verdict": "clean",
"prior": [
{
"id": "FC.1",
"status": "resolved"
}
],
"findings": []
} |
Closes OpenConceptLab/ocl_issues#3064.
On a project with a bridge algorithm (its own, or the one the API offers), the Mapper read the same
mapped-sources/list several times per page load and once more per save: the bridge-probe effect ran again on everyprojectchange, and the target version read the list again when the bridge resolved to the same version. That list can be slow to answer, so each repeat adds server load.What changes
mappedSources.js(new):createMappedSourcesReaderkeeps each page's request for the open project, keyed by version and page. The bridge probe and the target version read through the one reader, so they share a request in flight and reuse a finished one.<repository>/and at<repository>/HEAD/. A version id the API encodes in its URL (@,+and the like) is read separately by the bridge and the target, as before: the server can read the bare and encoded forms differently.APIService's raw mode, so a failed or throttled read settles. A page that fails isn't kept, so the next ask reads it again.retryWithBackoff), only while a read still waits for that page.probeBridgeMappedSources(new): the bridge probe's logic, moved out of the effect so it can be tested. A bridge algorithm with a version reads that version. One without a version resolves it with$resolveReferencein the effective namespace, then reads the result. A selected algorithm still pins its resolved version. New: a network error or a 5xx on$resolveReferenceis tried again twice, and a probe stopped before its version resolves pins, reads and retries nothing.MapProject.jsx: the probe effect's dependencies are now the inputs it uses: the bridge algorithm's id, repository and version,bridgeEnabled, and the effective namespace (namespace || project.owner_url || owner). It no longer depends on the wholeproject. Requests stay the same (excludeSelf=false&brief=true, 25 per page).Tests
__tests__/mappedSources.test.jscounts reads with a fake API:MapProject.jsx, as inusageRouteProject.test.js:project);npm run test:all: 719 unit and 13 integration tests pass. ESLint is clean.Checked in a real browser against a local mock API (no outside requests): the dev build of this branch and of
main, headless. The project had a CIEL target, the API offered a CIEL bridge algorithm with no version, and the list had 50 sources (2 pages).main$resolveReferencecallsWith the mock's first list read answering 503, this branch tried it again 3.8 s later and the list loaded.
Not changed: with the bridge algorithm selected, opening the project still resolves the bridge version twice (once for the offered algorithm, then for the selected one). That's one small POST each, and they don't repeat on saves.
🤖 Generated with Claude Code
https://claude.ai/code/session_01AaZ4qVXohXhqMLGigP4RHV