Repository navigation
Conversation
… a release over HEAD recorded beside another release Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qWkLnjsCZJ8jUFU5Vd
…release gives way to the release closest to the members Codex, pass 1: the choice reads what the rebuild itself ends with, not a release the old list still had; and of the releases holding a reference's members it takes the one holding the most members of them all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qWkLnjsCZJ8jUFU5Vd
|
Codex review, pass 1 (codex-cli 0.169.0, commit 39c9ba1) Verdict: findings, 2 finding(s).
findings.json{
"reviewer": "codex-cli 0.169.0",
"perspective": "defects",
"mode": "full",
"commit": "39c9ba19b",
"verdict": "findings",
"prior": [],
"findings": [
{
"id": "F1.1",
"severity": "P1",
"tag": null,
"file": "core/collections/version_lists.py",
"line": 106,
"claim": "An older explicit pin can take the place of a mixed evaluated HEAD and prevent the rebuild from selecting the newest live release.",
"scenario": "The evaluated list contains HEAD and v2, and a separate versioned reference pins v3 explicitly. Of two versionless references, c1 is held by v2 and v4, while c2 is held by HEAD, v3, and v4. The rebuild promotes v3 for c2 and settles on {v2, v3}. The next locked build uses v3 and drops c1 even though v4 holds both members.",
"action": "When a reference would pick HEAD alongside an evaluated release, try the newest visible live release that holds all its members before falling through to a lower-priority recorded pin. Cover the mixed explicit and evaluated case for sources and value sets.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F1.2",
"severity": "P2",
"tag": null,
"file": "core/collections/version_lists.py",
"line": 104,
"claim": "An unused release left in the old list can turn a HEAD-only evaluation into a release lock.",
"scenario": "After the only reference using v2 is removed, the old evaluated list still contains {HEAD, v2}. The remaining reference's member is held by HEAD and v3. The base rebuild drops unused v2 and keeps HEAD. This change instead pins v3, so a subsequent versionless add can miss members added to HEAD after v3.",
"action": "Base the HEAD demotion on whether the current references would actually record a release beside HEAD. Add a regression test with an unused release in the old evaluated list.",
"lines_delta": null,
"confidence": "high"
}
]
} |
|
Reply to pass 1, in 2c262d5:
So a second run on lists that an earlier version of the command left gives what one run with this change gives: both start from the same settled lists. |
…es replaces HEAD beside a release Codex, pass 2: includes and excludes are counted together, a newer lock doesn't come back when the references settle, and a version another reference names, retired or not, doesn't come before the live releases. HEAD's own rows count for the release that holds their latest version, and on a tie the lock stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qWkLnjsCZJ8jUFU5Vd
|
Codex review, pass 2 (codex-cli 0.169.0, commit 2c262d5) Verdict: findings, 4 finding(s).
findings.json{
"reviewer": "codex-cli 0.169.0",
"perspective": "defects",
"mode": "verify",
"commit": "2c262d569",
"verdict": "findings",
"prior": [
{
"id": "F1.1",
"status": "unresolved"
},
{
"id": "F1.2",
"status": "resolved"
}
],
"findings": [
{
"id": "F2.1",
"severity": "P1",
"tag": null,
"file": "core/collections/version_lists.py",
"line": 449,
"claim": "Source settling can restore a newer lock that the coverage ranking correctly displaced.",
"scenario": "The evaluated list is {HEAD, v4}. Version v4 holds c1, HEAD holds c2, and v3 holds both. The coverage ranking picks v3 for both references, but settling moves c1 back to v4 because v4 was already evaluated and is newer. The rebuild writes {v3, v4}, so the next locked build uses v4 and loses c2.",
"action": "Honor the coverage ranking during settling for repositories with mixed HEAD and release locks. Add a regression test where the best release is older than the existing lock.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F2.2",
"severity": "P1",
"tag": null,
"file": "core/collections/version_lists.py",
"line": 529,
"claim": "F1.1 still occurs for value sets because the first eligible recorded version wins without comparing coverage.",
"scenario": "Two version-less value-set references contribute c1 and c2. The evaluated list is {HEAD, v2}, and a separate reference explicitly pins v3. Version v2 holds c1, HEAD and v3 hold c2, and v4 holds both. The rebuild settles on {v2, v3}. The next locked build uses v3 for both version-less references and loses c1.",
"action": "Rank value-set releases by coverage across all version-less references to that value set. Add a regression test with the separate explicit pin.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F2.3",
"severity": "P1",
"tag": null,
"file": "core/collections/version_lists.py",
"line": 418,
"claim": "Source release scoring counts includes and excludes separately, so a release covering both can lose.",
"scenario": "The evaluated list is {HEAD, v2}. One reference includes c1, which v2 and v3 hold. Another excludes c2, which HEAD, v3, and v4 hold. The include group picks recorded v2 and the exclude group picks newest v4. The next locked build uses v4 and loses c1 even though v3 holds both members.",
"action": "Compute one coverage score per release across the source's version-less includes and excludes, then use that score when choosing each reference's holder.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F2.4",
"severity": "P2",
"tag": null,
"file": "core/collections/version_lists.py",
"line": 105,
"claim": "An explicitly pinned retired version can take the evaluated lock even when a live release holds the same members.",
"scenario": "The evaluated list is {HEAD, v2}, with c1 held by v2 and c2 held by HEAD. A separate reference explicitly pins retired v4. Live v3 and retired v4 both hold c1 and c2. Their coverage scores tie, and v4 comes first because it was recorded. The rebuild makes v4 the evaluated lock.",
"action": "Restrict HEAD replacement to active, released, non-retired versions, including when considering versions already recorded. Preserve the separate explicit pin.",
"lines_delta": null,
"confidence": "high"
}
]
} |
|
Reply to pass 2, in b6a5132. The four findings had one cause, so one change answers them: once HEAD goes last for a source, its live releases are ranked once, by how many members of all its references without a version each one holds.
Two things I added, from trying the rule on more cases. On a tie the lock stays, so the next add doesn't move to a newer release for nothing. And a member that is the source's own current row counts for the release that holds its latest version, as the content is the same. Ten of the 15 new tests fail without the change, and each one also checks that a second run changes nothing. |
…t live releases, and value sets stay as they were Codex, pass 3: a draft or a retired version that another reference names no longer replaces HEAD. Value sets are out of this change: each reference to one is judged on its own, without the step that settles a source's references. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qWkLnjsCZJ8jUFU5Vd
|
Codex review, pass 3 (codex-cli 0.169.0, commit b6a5132) Verdict: findings, 4 finding(s).
findings.json{
"reviewer": "codex-cli 0.169.0",
"perspective": "defects",
"mode": "verify",
"commit": "b6a513243",
"verdict": "findings",
"prior": [
{
"id": "F1.1",
"status": "resolved"
},
{
"id": "F1.2",
"status": "resolved"
},
{
"id": "F2.1",
"status": "unresolved"
},
{
"id": "F2.2",
"status": "unresolved"
},
{
"id": "F2.3",
"status": "resolved"
},
{
"id": "F2.4",
"status": "resolved"
}
],
"findings": [
{
"id": "F3.1",
"severity": "P1",
"tag": null,
"file": "core/collections/version_lists.py",
"line": 122,
"claim": "Value-set releases receive no coverage score, so the rebuild can choose a newer release that drops a member.",
"scenario": "Two versionless value-set references contribute c1 and c2. The evaluated list is {HEAD, v2}. Version v2 holds c1, HEAD and v4 hold c2, and v3 holds both. The rebuild keeps v2 for c1 and picks v4 for c2. The next locked build uses v4 for both references and loses c1.",
"action": "Rank live value-set releases by coverage across all versionless references to that value set. Test an older release that holds both members against a newer release that holds only one.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F3.2",
"severity": "P1",
"tag": null,
"file": "core/collections/version_lists.py",
"line": 480,
"claim": "Source settling can discard the coverage-ranked release when another reference picks a newer release.",
"scenario": "The evaluated list is {HEAD, v4}. Three versionless references contribute c1, c2, and {c3, c4, c5}. HEAD holds c2 through c5, v3 holds c1, c3, and c4, and v4 holds c1 and c2. The coverage pass picks v3 for c1, v4 for c2, and HEAD for the third reference. Settling sorts those picks by recency and moves c1 back to v4. The command reports {HEAD, v4} as settled and never records v3.",
"action": "Preserve coverage-ranked choices during source settling. Add a regression test where another reference still needs the newer release.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F3.3",
"severity": "P2",
"tag": null,
"file": "core/collections/version_lists.py",
"line": 109,
"claim": "A recorded draft can replace HEAD for a reference whose member is absent from every release.",
"scenario": "The evaluated list is {HEAD, v2}, and a separate reference explicitly pins a newer draft. Version v2 holds c1. HEAD and the draft hold c2, which no release holds. The rebuild picks the draft for c2 before trying HEAD and writes {v2, draft}. A locked build then uses the draft and loses c1 if the draft lacks it.",
"action": "Try HEAD before recorded non-live versions when no live release holds the reference's members. Preserve the separate explicit draft pin.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F3.4",
"severity": "P2",
"tag": null,
"file": "core/collections/version_lists.py",
"line": 256,
"claim": "The command can mark value-set lists settled even though a second run rewrites them.",
"scenario": "Four versionless references to one value set contribute c1, c2, c3, and c4. The evaluated list is {HEAD, v1, v4}. HEAD holds c3, v1 holds c4, v2 holds c1, v3 holds c3, and retired v4 holds c1 and c2. The first run applies {v1, v2, v3, v4}. The second run starts with ordinary recorded-version ordering, picks v4 for c1, and removes v2. HEAD is already gone, so the coverage pass never runs again.",
"action": "Verify stability using the candidate order a fresh invocation will use before marking the lists settled. Add a test that applies the first result and checks that the second run leaves it unchanged.",
"lines_delta": null,
"confidence": "high"
}
]
} |
|
Reply to pass 3, the last, in 64f78f2:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qWkLnjsCZJ8jUFU5Vd
|
Simplification review (a fresh Claude subagent, commit 64f78f2): 3 possible cuts, 1 taken, in 2b2916b.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qWkLnjsCZJ8jUFU5Vd
|
Codex check of commits b6a5132..2b2916b (codex-cli 0.169.0, commit 2b2916b) Verdict: findings, 1 finding(s).
findings.json{
"reviewer": "codex-cli 0.169.0",
"perspective": "defects",
"mode": "final",
"commit": "2b2916b74",
"verdict": "findings",
"prior": [],
"findings": [
{
"id": "FC.1",
"severity": "P2",
"tag": null,
"file": "core/collections/version_lists.py",
"line": 412,
"claim": "HEAD can now take precedence over an already-recorded live release that the visibility filter excludes from discovery.",
"scenario": "Two versionless references contribute c1 and c2. The evaluated list contains public HEAD and public v2, which holds only c1. A separate reference explicitly pins live v3 for c1. Version v3 is private to another organization and holds both members. The previous revision settled on v3. The new order tries HEAD before the recorded v3 and leaves {HEAD, v2}. A subsequent locked build by a user who can access v3 now uses v2 and drops c2.",
"action": "Try already-recorded live releases before HEAD and keep drafts and retired versions after HEAD. Preserve the visibility filter for unrecorded releases and add a regression test for the private live pin.",
"lines_delta": null,
"confidence": "high"
}
]
}FC.1 (P2): accepted. It takes a reference that names another owner's private release. The command then records HEAD and v2, which is what it records on master too, so nothing gets worse. Trying that release first would lock the collection to a version its owner may not be able to view, and the next reference without a version would be read from it. One commit came after this check, 7851662: it only wraps a docstring line. |
For OpenConceptLab/ocl_online#549. The command is from OpenConceptLab/ocl_issues#3005 (#1030).
In short:
rebuild_expansion_version_listscould record a source's HEAD beside an older release. The older release then decided what a release made from the collection holds, so members that were added to the source after that release were left out, also when a newer release has them. With this change the command records the newer release.What went wrong
A collection's HEAD has
c1, from v2, which v3 has too, andc2, which was added to the source after v2 and is in v3. Its expansion recorded v2 and the source's HEAD. Neither reference names a version.c2that was HEAD, which holds everything current, so it never looked at v3. It recorded HEAD and v2 as evaluated.c1and noc2.The command itself never changes a member. The loss came later, with the next release.
c1c1,c2The change
The lists settle as before. If a source's HEAD is then left beside a release of it, the rebuild goes on with HEAD last for that source:
If you ran the command before this change
Run it again, with the options you used then. The new step starts from the settled lists, and those are what the first run left, so you get what one run with this change gives. Run
backfill_expansion_healthafter it, as after the first one.It doesn't repair a release that was made in between. Make that one again, or compare it with the collection's HEAD.
Tests
tests_version_lists.py, each of which also checks that a second run changes nothing. Eight fail without the change. The other six keep what should stay: HEAD as the only version, HEAD beside a release that nothing uses, the lock on a tie, a draft that another reference names, and members that no release holds, also when the collection's owner can't view the source's HEAD.tests_version_lists,tests_reference_conversionsandtests_healthpass (212), and pylint is clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01AaZ4qWkLnjsCZJ8jUFU5Vd