Repository navigation
Description
Problem
config/constants.py and config/defaults.py declare 75 names (55 constants, 20 defaults) that only one of these packages uses. Counted at 38517a8 (the release/v0.2.25 tip) by AST, with the method described in #1016: from-imports and attribute reads count, and re-exports do not. The counts are approximate (an independent count differs by up to about ten per item, mostly in how function-local imports and names that only build another config/ name are attributed); the baseline is the exact list.
- By package:
roadmap/33,github/30,git/10 andrelease/2. 15 modules read them. The largest readers aregithub/rate_limiter.py(12),git/operations.py(10),roadmap/github_store.py(10),roadmap/document.py(9),github/graphql.py(7),roadmap/migrate.py(7) andgithub/check_verdict.py(6). feat(release): release-please makes every release from main #1952 deletedrelease/,roadmap/document.pyandroadmap/migrate.py, so recount the names before the move. - Four are read by two or more modules of one package. For example,
CONST_GH_PROJECT_JOB_RECORD_FIELD(constants.py:725) is read byroadmap/store.py,roadmap/memory_store.pyandroadmap/github_store.py, andDEFAULT_GH_CACHE_TTL_SECONDS(defaults.py:729) bygithub/projects.pyandgithub/rate_limiter.py.
The placement rule (#1016) puts each of these names next to the code that reads it. That item's baseline lists them under roadmap, github and git, and its invariant fails once a listed name is moved and its entry is left behind, so this PR deletes those blocks.
Acceptance criteria
- Each name listed under
roadmap,githubandgitintests/fixtures/config_placement_baseline.jsonis declared in the one module that reads it, or in its package'sconstants.pywhen two or more modules of the package read it. Its name, value and comment are unchanged, and it is annotatedFinal.config/constants.pyandconfig/defaults.pyno longer declare it, and its block is gone from the baseline. - Every importer imports the name from its new module, including the test files that import it. Nothing in
config/re-exports it. - A name that only code deleted by an earlier item read is deleted, not moved.
- The two invariant tests from docs(agents): a matching table lives beside its one owner, and moves to config/ only when a second package imports it #1016 pass.
- Apart from the
Finalannotation added where a name lacked it, the PR only moves code:git diff --color-moved=zebrashows every other declaration line as moved. The diff touches onlyconfig/constants.py,config/defaults.py, the baseline,roadmap/,github/andgit/and the tests that import the moved names. -
uv run devops cipasses.
Key questions
- Does a name go into the module that reads it, or into the package's
constants.py? (proposed) Into the module, when one module reads it. Into the package'sconstants.pywhen two or more do, as the rule says. That applies to four names here, for exampleCONST_GH_PROJECT_JOB_RECORD_FIELDandDEFAULT_GH_CACHE_TTL_SECONDS. - When does it land? (proposed) After refactor(github): the github session owns transport, ledger, error classes and link pagination #983 (v0.2.28). refactor(github): one github session per identity owning token, quota and transport #767 and refactor(github): the github session owns transport, ledger, error classes and link pagination #983 rewrite
github/rate_limiter.pyandgithub/graphql.pyand delete pagination helpers and rate-limit pattern constants. refactor(github): board fields are written only through the roadmap store, and projects.py keeps provisioning #999 reshapesgithub/projects.py. Moving their tables first would move names those items delete. - Can the move add an import cycle? (proposed) No. A moved table imports nothing new, and a package's
constants.pyimports nothing from its package.test_no_circular_imports_in_decoupled_subsystems(tests/test_architectural_invariants.py:308) is the check.
Depends on: #1016, #776, #983.
Order: after #983 in v0.2.28 or later, and after #999 when it is scheduled first.
Related: #767, #983, #743, #999, #998, #776.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsReady
- StatusShow more project fieldsReady
Activity
[-]refactor(github): the github, roadmap, git and release tables move out of config/ next to their owners[/-][+]refactor(github): the github, roadmap and git tables move out of config/ next to their owners[/+]dan-petty commentedon Oct 28, 2026
Closed as not planned. The item conflicts with a more recent project direction. No code was written.
This item is a bulk move of the
github,roadmapandgittables out ofconfig/. Its acceptance criteria need the baseline filetests/fixtures/config_placement_baseline.jsonand "the two invariant tests from #1016".The owner decision of 2026-10-22 on #1016 replaced that plan:
core/config_placement.py, the baseline filetests/fixtures/config_placement_baseline.jsonand the two invariants of the plan below are not built."#2492 (merged 2026-10-28) put that decision in
CONTRIBUTING.md: "When you change the owner of a table inconfig/that only one package reads, move the table to its owner in the same pull request."Evidence on origin/main (2026-10-28):
tests/fixtures/config_placement_baseline.jsonandcore/config_placement.pydo not exist, and no test checks the placement. Three criteria of this item ("its block is gone from the baseline", "The two invariant tests from docs(agents): a matching table lives beside its one owner, and moves to config/ only when a second package imports it #1016 pass", and the move of each listed name) cannot be met.config/constants.py,config/defaults.pyand 15 modules conflicts with each open pull request that touches those files.A table in
config/that onlygithub/,roadmap/orgit/reads now moves to its owner in the pull request that next changes that owner.#1025 and #1027 to #1032 are the same kind of bulk move on the same baseline, so the same evidence applies to them. This comment does not close them.