Repository navigation
Conversation
…rn public_access It has the same value as the repository's own address. Who sees which repositories doesn't change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qVmwkeg26E7AcP35TN
…ublic_access too Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qVmwkeg26E7AcP35TN
|
Codex review, pass 1 (codex-cli 0.171.0, commit e8f631c) 2 findings: P1 2.
findings.json{
"reviewer": "codex-cli 0.171.0",
"perspective": "defects",
"mode": "full",
"commit": "e8f631c16af58324b7f02001048dfe89020ebcf0",
"verdict": "findings",
"prior": [],
"findings": [
{
"id": "F1.1",
"severity": "P1",
"tag": null,
"file": "core/sources/views.py",
"line": 123,
"claim": "Brief source and collection lists omit public_access.",
"scenario": "An owner requests a source or collection list with ?brief=true. The private repository appears, but its row has no public_access even though its detail response returns \"None\". The web app cannot mark it as private from the brief response.",
"action": "Add public_access to SourceMinimalSerializer and CollectionMinimalSerializer and extend the public and private list assertions to cover brief responses.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F1.2",
"severity": "P1",
"tag": null,
"file": "core/collections/views.py",
"line": 1641,
"claim": "Named versions omit public_access in version lists and nested reference resolution results.",
"scenario": "An authorized user lists a repository's versions or resolves the URI of a private named version through /$resolveReference/. The version detail returns public_access \"None\", but the list row and the nested result omit the field because both use the version-list serializers.",
"action": "Expose the version row's public_access in both version-list serializers. Test a named version whose access differs from HEAD.",
"lines_delta": null,
"confidence": "high"
}
]
} |
|
Answers to pass 1:
|
…ublic_access Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qVmwkeg26E7AcP35TN
|
Codex review, pass 2 (codex-cli 0.171.0, commit 9f3f5ce) 1 finding: P1 1.
findings.json{
"reviewer": "codex-cli 0.171.0",
"perspective": "defects",
"mode": "verify",
"commit": "9f3f5ce32c21daa68d96863eccccd5f3267fe77f",
"verdict": "findings",
"prior": [
{
"id": "F1.1",
"status": "regressed"
},
{
"id": "F1.2",
"status": "unresolved"
}
],
"findings": [
{
"id": "F2.1",
"severity": "P1",
"tag": null,
"file": "core/integration_tests/tests_sources.py",
"line": 111,
"claim": "Adding public_access to brief responses breaks two existing integration tests.",
"scenario": "Both test_get_200 cases request an organization's brief list with one public repository. The response now includes public_access: View, so the exact dictionary assertions here and in core/integration_tests/tests_collections.py:135 fail. The mismatch was verified statically because Docker socket access was denied.",
"action": "Add public_access to both expected response dictionaries.",
"lines_delta": null,
"confidence": "high"
}
]
} |
|
Answer to pass 2:
|
|
Codex review, pass 3 (codex-cli 0.171.0, commit 9af39e5) Clean: no findings. findings.json{
"reviewer": "codex-cli 0.171.0",
"perspective": "defects",
"mode": "verify",
"commit": "9af39e50d75b57e263c19e9597e5158570027bb7",
"verdict": "clean",
"prior": [
{
"id": "F1.1",
"status": "resolved"
},
{
"id": "F1.2",
"status": "unresolved"
},
{
"id": "F2.1",
"status": "resolved"
}
],
"findings": []
} |
|
Simplification review (claude subagent, commit 9af39e5) Clean: no findings. findings.json{
"reviewer": "claude subagent (sonnet)",
"perspective": "simplify",
"mode": "full",
"commit": "9af39e50d75b57e263c19e9597e5158570027bb7",
"verdict": "clean",
"prior": [],
"findings": []
} |
|
The review loop is done: pass 3 and the simplification review are clean, and no commit came after them. F1.2 stays outside this ticket, as answered after pass 1: lists of versions have the value with |
snyaggarwal
left a comment
There was a problem hiding this comment.
Approve. The PR adds public_access to the list and short (brief=true) forms of sources and collections. Each row shows the same value as the repository's own address, and nothing changes about who gets which rows.
Merge order: any time, so no ordering with the TBv3 lock PR. It's based on today's master (3c2e9c1) and merges cleanly with it, #1119, #1120, #1128 and #1100. It conflicts with #1078 in core/collections/serializers.py and core/sources/serializers.py, in the same Meta.fields lines #1119 touches. Whichever merges second has to resolve it, and the fix is small. Lint and Tests pass on 9af39e5.
What I checked:
- No new leaks in the lists. The lists and
/repos/pass these serializers only repositories the requester can already open, and those repositories' own addresses already returnpublic_access. Rows come from the database, so the value is current even before the index catches up. - Other users of the changed serializers.
get_brief_serializer: the event feed checkscan_viewbefore it serializes an event's object or referenced object.$resolveReference: it reports a repository the requester can't view as unresolved before it usesSourceListSerializerorCollectionListSerializer.
- Consistency with #1119. The field is the HEAD's own value, next to #1119's
versionscount for the requester's view. Neither depends on the other. - Tests.
RepoListsPublicAccessTestcovers a person's and an organization's lists and the global lists: full and brief forms, as owner or member and signed out, compared with each repository's own address.
Non-blocking, from before this PR: AbstractMappingSerializer embeds from_source and to_source with SourceListSerializer (?includeSources, ?includeFromSource, ?includeToSource), and doesn't check access. If a mapping someone can view points at a source they can't, that source's summary was already in the answer, and it now also carries "public_access": "None". This is outside #886, and I agree with your answer to F1.2 that version lists are too. It may be worth its own ticket.
Part of OpenConceptLab/ocl_online#886
The lists of sources, collections and repositories now return
public_accessfor each one, with the same value as the repository's own address. Before, a reader of a list couldn't tell a private repository from a public one.?brief=true) has it too, and so do other answers that use the same form of a source or a collection.TBv3 draws its lock from this in a separate pull request. Either one can be released first: without the field, TBv3 shows no lock.
How it was checked: a new test reads a person's and an organization's lists and the global ones, as a member and signed out. It compares each value with the repository's own address. It failed before the change. The whole suite passes: 4,289 tests without search (2 skipped) and 815 with it. Two older tests that check the exact short form now expect the field.
To check on staging:
GET /users/<you>/repos/with your token shows"public_access": "None"on a private repository and"View"on a public one.🤖 Generated with Claude Code
https://claude.ai/code/session_01AaZ4qVmwkeg26E7AcP35TN