Repository navigation
Description
Problem
Adding github/repository.yaml in dan-petty/devops-cli#7792 (devops repos onboard dan-petty/devops-cli --confirm) creates a top-level github/ directory in git (TrackedTree.top_entries in src/devops_cli/docs/path_collector.py).
Because docs/SELF_IMPROVEMENT.md:100 references `github/merge_readiness.py` without the src/devops_cli/ prefix, _missing_concrete_path matches seg0 == "github" in tree.top_entries instead of tree.package_suffixes and stops checking src/devops_cli/. That causes devops docs check, Static Analysis, and Tests & Coverage (tests/docs/test_docs.py::test_docs_cli_generate_and_check and tests/docs/test_docs_source_argv_collector.py::test_docs_check_reports_an_unresolved_source_argv) to fail on #7792:
docs/SELF_IMPROVEMENT.md:100: code-span path 'github/merge_readiness.py' does not exist in git (probable new path: src/devops_cli/github/merge_readiness.py)
Expected Behavior
Either update docs/SELF_IMPROVEMENT.md:100 to reference src/devops_cli/github/merge_readiness.py (or github/merge_readiness.py in path_collector.py should also check src/devops_cli/ when a top-level directory shares a name with a src/devops_cli/ subpackage) so adding github/repository.yaml passes Static Analysis and Tests & Coverage.
Proposed design
Problem statement
Adding github/repository.yaml creates a top-level github/ directory. The docs path checker then stops at the top-level path. It rejects the documented package path github/merge_readiness.py. The docs checks fail although src/devops_cli/github/merge_readiness.py exists.
Acceptance criteria
Requirement: Package path with shared top-level name
The path collector MUST check src/devops_cli/ for a code-span path when its first segment is a tracked top-level directory and the top-level path does not match.
Scenario: Shared top-level github directory
- WHEN A
TrackedTreeholdsgithub/repository.yamlandsrc/devops_cli/github/merge_readiness.py, andcandidateisgithub/merge_readiness.pywithext='.py',has_glob=Falseandhas_slash=False. - THEN
_missing_concrete_pathreturnsNone.
Requirement: Missing package path still reports
The path collector MUST report a code-span path that resolves in neither the top-level directory nor src/devops_cli/.
Scenario: Missing module under shared top-level github directory
- WHEN A
TrackedTreeholdsgithub/repository.yamland nosrc/devops_cli/github/absent.py, andcandidateisgithub/absent.pywithext='.py',has_glob=Falseandhas_slash=False. - THEN
_missing_concrete_pathreturnsgithub/absent.py.
Requirement: Docs check with top-level github directory
The docs check MUST pass when a top-level github/ directory and the documented package path github/merge_readiness.py both exist.
Scenario: Docs check on the shared-name tree
- WHEN The tests
tests/docs/test_docs.py::test_docs_cli_generate_and_checkandtests/docs/test_docs_source_argv_collector.py::test_docs_check_reports_an_unresolved_source_argvrun on a tree that tracksgithub/repository.yamlandsrc/devops_cli/github/merge_readiness.py. - THEN Both tests pass and report no
code-span path 'github/merge_readiness.py' does not existfinding.
Existing Tool Considered
No alternatives check has run. No open, maintained tool covers this repository-specific path-resolution rule. The change keeps the resolver in src/devops_cli/docs/path_collector.py. Cost to build, keep and fix this code: about 2,000 tokens and about 1 hour.
Key questions
- What does
_missing_concrete_pathdo when the first path segment is a top-level entry?: It checks only the top-level path. It returnsNonewhen that path matches. It returns the candidate when that path does not match, and it does not checkpackage_suffixes. [sources: src/devops_cli/docs/path_collector.py:206] - Should the fix change the document line or the path resolver?: Fix the resolver. After the top-level check fails, check
src/devops_cli/<candidate>whenseg0is inpackage_suffixes. (best practice) [sources: AGENTS.md, src/devops_cli/docs/path_collector.py:206, docs/SELF_IMPROVEMENT.md:100]- Rejected: Change the document line to
src/devops_cli/github/merge_readiness.py. It hides the resolver defect. A later top-level directory with a package name makes the same false finding. - Chosen: Check the package path after the top-level path in
_missing_concrete_path. It fixes the cause and keeps the documented package-relative path valid. - Rejected: Special-case only
github. It leaves the same defect for every other top-level directory that shares a package name.
- Rejected: Change the document line to
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 29, 2026
The bug causes Static Analysis and Tests & Coverage to fail on PR #7792, which is a CI failure.#4904 added the docs path-check feature; this candidate fixes a resolution bug in that feature when a top-level directory shares a name with a subpackage.devops-cli-service commentedon Nov 29, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
devops-cli-service commentedon Nov 29, 2026
Released in v0.252.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.252.0
devops-cli-service commentedon Nov 29, 2026
Live since 2026-11-29 18:59 UTC