Repository navigation
Description
Decision (owner, 2026-10-22)
This section replaces any text below that conflicts with it.
- A string table lives beside its one owner. It moves to
src/devops_cli/config/only when a second package imports it. - A maintained library or a language parser does the classification. A hand-written list is acceptable only for a closed domain that a standard defines, such as an RFC or a language grammar.
- AGENTS.md lines 16 to 19 become one bullet, "Classify With Parsers, Not Hand Lists" (pair A16). The duplicate bullet "Standard Parsers Over Brittle Literals" is deleted (pair A17).
- The template in
src/devops_cli/ai/instruction_generator.py:313-320,RELEASE_CYCLE.md:63-65anddocs/ROUTINE_TASKS.md:28, 102-103state the same rule. - No constant moves in this pull request. A constant moves when its module is next touched.
- No gate checks the placement. The project adds no new ratchet. The module
core/config_placement.py, the baseline filetests/fixtures/config_placement_baseline.jsonand the two invariants of the plan below are not built. The change toDEFAULT_SANDBOX_POLICYthat satisfies the second invariant is not needed.
Acceptance criteria for this decision:
- No document and no generator output says that constants must be declared in
constants.pyordefaults.py. - AGENTS.md is shorter than before the change.
-
uv run devops cipasses.
Refreshed plan (2026-10-17, unblocking review)
This section supersedes any text below that conflicts with it.
Decisions
- Decision D16 (owner, 2026-10-17): "v0.2.38 may go over the cap of 16 for now; unblocking work goes first." This item is in v0.2.38 as unblocking work. Together with refactor(config): the config barrel and the unused config names go, and the package inits stop re-exporting #776's first step, it must land before refactor(review): the review's single-owner tables move out of config/ into ai/review/ and review/ #1025-refactor(cli): the telemetry, ui, model, core and output tables move out of config/ next to their owners #1032.
- Decision D15 (owner, 2026-10-17): "refactor(review): the review's single-owner tables move out of config/ into ai/review/ and review/ #1025 widens to cover src/devops_cli/review/, with no new sibling item." So the baseline's
ai/review,ai/review/stagesandreviewpackage blocks all belong to refactor(review): the review's single-owner tables move out of config/ into ai/review/ and review/ #1025. - The priority stays P3 under the owner's blocker rule, because every item this one blocks (refactor(review): the review's single-owner tables move out of config/ into ai/review/ and review/ #1025-refactor(cli): the telemetry, ui, model, core and output tables move out of config/ next to their owners #1032) is P3.
- Both checks are pure functions over parsed trees in a new
src/devops_cli/core/config_placement.py, called from the test. That is howimport_cycle_violationsandinterface_layer_violations(src/devops_cli/core/import_graph.py:196,:256) are built and tested on tmp_path trees. - Both checks run on the trees from
_parse_src()insidetest_the_source_tree_keeps_its_structural_invariants, not on a new cached parse shared with_exporting_modules. That test's docstring (tests/test_architectural_invariants.py:220-221) makes it the one whole-tree parse and says further whole-tree rules belong there. - The time budget is now a before-and-after difference, because absolute durations on the shared dev container change with load. Today's run of the existing whole-tree test took 39 s under load; the body measured 2 to 3 s for the parse.
- AGENTS.md is still edited by hand, for a new reason. docs(agents): instruction surfaces state only what is true, and
devops ai agentsnever overwrites AGENTS.md #840 (closed, v0.2.27) madedevops ai agentsrefuse to overwrite AGENTS.md without--force(src/devops_cli/commands/ai.py:948-954), and--forceregenerates the whole curated file. AGENTS.md:182(Config & Defaults Separation) stays as it is, because it says which of the two files a shared name goes in, not that every table goes there.
Scope
- Unchanged: the rule in AGENTS.md and its template, the two hand-written docs, the baseline, the two invariants and the
docker/sandbox.pydefault. The moves stay with refactor(review): the review's single-owner tables move out of config/ into ai/review/ and review/ #1025-refactor(cli): the telemetry, ui, model, core and output tables move out of config/ next to their owners #1032, and the barrel and unread names stay with refactor(config): the config barrel and the unused config names go, and the package inits stop re-exporting #776. - The Problem section's counts are from 38517a8. Recounted at 3dd7fa6 with the same AST method, and the same uncertainty of about ten names per category:
config/constants.pyhas 4,055 lines and 980 module-level names, andconfig/defaults.pyhas 1,007 lines and 642 names. - About 1,090 of those names (687 constants, 403 defaults) are read by one package only, spread over 50 packages. About 245 are read by two or more packages and about 44 only by
config/. 45 areCONST_ERROR_CODE_*. About 128 are unread, and about 25 more only build an unread name. About 45 are read only by tests. - The audit query lists 299 tables in
constants.pyanddefaults.py, and 354 tables in 137 files outsideconfig/. - 91 files under
tests/now referencedevops_cli.config.constants, up from 35 at 38517a8. Wheneverconstants.pyis staged, the pre-commit hook runs the 88 of them that are test modules; the other three aretests/conftest.pyand two fakes. - Invariant 2 still has exactly one failure:
DEFAULT_SANDBOX_POLICY.
Delivery
- One PR (M) into
main, withCloses #1016. Tests come first: tmp_path trees for each rule in the new checker, then the whole-tree test with the generated baseline.
Acceptance criteria
These replace the body's criteria on the same subjects. The other criteria stand, with their lines re-pointed as listed under Current references.
-
src/devops_cli/core/config_placement.pyholds both checks as functions of parsed trees and a baseline mapping. tmp_path trees prove each rule: a name read by modules in two packages passes, withconfig/counting as one package; a name onlyconfig/reads passes; an unlisted single-package name fails; a listed name that now passes fails; a module that only re-exports a name does not count; a name that only builds anotherconfig/name takes that name's importers; an__init__.pythat reads a name counts in its own package; and aCONST_*orDEFAULT_*name declared outsideconfig/and read by another package fails. -
test_the_source_tree_keeps_its_structural_invariants(tests/test_architectural_invariants.py:215) runs both checks on the trees from_parse_src()and parses nothing else. Its--durations=0time rises by at most 1 s over the same test at the PR's base on the same machine, and the PR records both numbers. The checks run offline. - The baseline is generated at the PR's base and lists names by package. At 3dd7fa6 that is about 1,090 single-package names in 50 packages, plus the 45
CONST_ERROR_CODE_*names under their own key. The unread and test-only names also get their own keys: about 150 and 45 names at 3dd7fa6, or empty if refactor(config): the config barrel and the unused config names go, and the package inits stop re-exporting #776's first step has landed. - Invariant 2's one failure is
DEFAULT_SANDBOX_POLICY(src/devops_cli/sandbox/models.py:441), whichsrc/devops_cli/docker/sandbox.py:73reads. This PR changes that field toField(default_factory=SandboxPolicy).
Current references (verified at 3dd7fa6)
- Rule in AGENTS.md: heading at
AGENTS.md:17, brittle-subset bullets at:18-19, placement bullet at:20. - Rule in the template:
src/devops_cli/ai/instruction_generator.py:312(heading),:313-314(brittle-subset bullets) and:315(placement bullet). - Docs:
RELEASE_CYCLE.md:63-66, with constants at:65.docs/ROUTINE_TASKS.md:28and:100-104, with constants at:102. - Overwrite guard:
src/devops_cli/commands/ai.py:948-954. - Whole-tree parse:
_parse_srcattests/test_architectural_invariants.py:206-212, the test at:215-234, and the tmp_path tests of the import-graph checks at:377-487.tests/test_public_export_surface.py:104-112(_exporting_modules) is a separate parse and is left as it is. - Invariant 2:
src/devops_cli/sandbox/models.py:441;src/devops_cli/docker/sandbox.py:30-35(import) and:73(field). The__init__.pyexample issrc/devops_cli/ai/retries/__init__.py:24-26. - Hook and test selection:
.pre-commit-config.yaml:65-71andsrc/devops_cli/core/test_selection.py:87-111. - Problem-section examples:
_EMBEDDING_MODEL_HINTSis now atsrc/devops_cli/commands/benchmark.py:29and_SENSITIVE_ARG_FLAGSatsrc/devops_cli/security/sanitizer.py:350. - refactor(config): the config barrel and the unused config names go, and the package inits stop re-exporting #776's barrel:
src/devops_cli/config/__init__.py:408(_SETTINGS_EXPORTS),:442(__getattr__) and:450(__all__).
Dependencies and order
- This item is blocked by nothing.
- refactor(config): the config barrel and the unused config names go, and the package inits stop re-exporting #776 (open, P3, v0.2.38) is the other prerequisite. Its first step and this item do not wait on each other. Whichever lands second handles the baseline's unread and test-only keys: refactor(config): the config barrel and the unused config names go, and the package inits stop re-exporting #776 deletes them under its own criterion, or this item writes them empty.
- refactor(review): the review's single-owner tables move out of config/ into ai/review/ and review/ #1025-refactor(cli): the telemetry, ui, model, core and output tables move out of config/ next to their owners #1032 (all open, P3, no milestone) each wait on this item and on refactor(config): the config barrel and the unused config names go, and the package inits stop re-exporting #776. refactor(review): the review's single-owner tables move out of config/ into ai/review/ and review/ #1025 also waits on refactor(review): the persona review stage, the legacy segment engine and review-time RAG are deleted, and devops review builds a model client only for the explanation stages #1151's PR 2-3 (open, P1, v0.2.38) and keeps
status/blocked. refactor(github): the github, roadmap and git tables move out of config/ next to their owners #1026 also waits on refactor(github): the github session owns transport, ledger, error classes and link pagination #983 (open, P1, v0.2.37). Their native blocked-by links do not exist yet, and a person adds them. - feat(ci): hand-rolled URL and address parsing fails
devops ci, AGENTS.md makes the library the rule, and reviews stop discarding the findings #1107 (open, P1, no milestone): its PR 2 rewritesAGENTS.md:17-19and template:312-314. As the 2026-10-03 comment says, it leaves:20and:315to this item as the "Matching Table Placement" bullet. Whichever of the two lands second rebases. - refactor(config): a settings field is the one declaration, and the option, env and config-show registries become views of it #1000 (open, P2, v0.2.37) makes field-backed
DEFAULT_*names config-only. If it lands after this item, it deletes their baseline entries. - refactor(cli): exceptions carry their codes as class data, and one exit seam replaces 19 hand-rolled exits #1006 (open, P3, no milestone) empties the error-code key.
- refactor(cli): command help and messages live with their command, and shared option help stays in lang #1007 (open, P3, no milestone) edits the same
docs/ROUTINE_TASKS.md:28row and thelang/en/bullet at:104, and proposes landing after this item. Whichever lands second rebases. - test(cli): retire the tuple-assert mandate and detect opaque tuple asserts and presence-only tests #851 (open, P2, no milestone) no longer edits AGENTS.md or the template: docs(cli): docs/TESTING.md holds the test conventions, ADR 0005 records that tests double only process edges, and AGENTS.md and the contributor docs point to them #1308 removes the AGENTS.md copy of its mandate, and its 2026-10-07 correction found no copy in the template. It does plan to put its presence-check names in
config/constants.py, and only a test reads them, so if this item lands first those names go next to test(cli): retire the tuple-assert mandate and detect opaque tuple asserts and presence-only tests #851's check instead. - feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586, docs(agents): instruction surfaces state only what is true, and
devops ai agentsnever overwrites AGENTS.md #840 and docs(agents): AGENTS.md fits a context budget and Claude Code loads it #841 have closed (v0.2.25, v0.2.27 and v0.2.34) and are no longer part of the order.
Problem
AGENTS.md:21-24 requires every string list, tuple or frozen set used for matching, classification or filtering to be declared in config/constants.py or config/defaults.py, "so that it can easily be audited". The same rule is in the AGENTS.md template, src/devops_cli/ai/instruction_generator.py:301-304. Two hand-written docs repeat it: RELEASE_CYCLE.md:63-65 and docs/ROUTINE_TASKS.md:28 and :100-103.
The location is what the rule costs, and the audit it protects no longer depends on it. Counted at 38517a8 (the release/v0.2.25 tip) with an AST pass over src/devops_cli: a name counts as imported by a module when the module from-imports it or reads it as an attribute of the config module; config/__init__.py's re-exports are not counted. How function-local imports and names that only build another config/ name are attributed moves the per-category counts by up to about ten, so they are approximate; the baseline this item writes is the exact list.
config/constants.pyis 2,794 lines with 682 module-level names, imported by 193 modules.config/defaults.pyis 869 lines with 595 names, imported by 208 modules.- Only one package imports about 490 of the constants and 376 of the defaults. Two or more packages import about 60 and 89. Only
config/itself uses about 20 and 34, and about 30 more constants only build anotherconfig/name. 40 more areCONST_ERROR_CODE_*, which onlyexceptions/reads (refactor(cli): exceptions carry their codes as class data, and one exit seam replaces 19 hand-rolled exits #1006 turns them into class data). Nothing imports about 35 and 94, and only tests import 7 and 1 (refactor(config): the config barrel and the unused config names go, and the package inits stop re-exporting #776 deletes or moves those). - 86% of the assignment lines in
constants.pybelong to a name that one module or none imports. - The rule is not followed today either. About 100 module-level string tables live outside
config/in about 50 modules, 71 of them with private names (for example_EMBEDDING_MODEL_HINTSincommands/benchmark.py:26and_SENSITIVE_ARG_FLAGSinsecurity/sanitizer.py:310). 41CONST_*orDEFAULT_*names are declared in 19 modules outsideconfig/. Reviewingconfig/alone misses all of them. A grep for module-level upper-case collections finds 285 outsideconfig/.
What the shared file costs, from git history:
- 14 of the 29 item PRs merged into release/v0.2.25 edited
constants.py, and 17 of 29 edited it ordefaults.py. In v0.2.24 it was 21 and 23 of 45 PRs (release-process and changelog PRs excluded). For example, 9c879ae (fix(security): dive invents layers, the rbac audit checks nothing, and checkov's fallback and the complexity scan miss cases #957) added 23 names (90 lines) atconstants.py:399. Each name is read by one module,security/checkov.py(16) ork8s/rbac.py(7). - The cost is not merge conflicts. Seven pairs of v0.2.25 item PRs that were open at the same time both edited
constants.py. For the five whose head commits are still available, a three-way merge of the file conflicts in none. Two such pairs editeddefaults.py, and neither conflicts. The same check onCHANGELOG.mdconflicts in all three of those pairs that also both edited it (feat(github): github-sourced roadmap, migration and generated roadmap view (devops roadmap migrate,render) (#739) #928/feat(github): pr readiness requires an issue-linked, completed task file (#704) #929, feat(github): github-sourced roadmap, migration and generated roadmap view (devops roadmap migrate,render) (#739) #928/feat(review): branch and pr reviews compute their own base-vs-head symbol delta (#593) #932, feat(github): pr readiness requires an issue-linked, completed task file (#704) #929/feat(review): branch and pr reviews compute their own base-vs-head symbol delta (#593) #932), three of the four conflicts fix(release): changelog fragments so concurrent pull requests never conflict on CHANGELOG.md or docs/ROADMAP.md #933 recorded. In the recorded fix(security): dive invents layers, the rbac audit checks nothing, and checkov's fallback and the complexity scan miss cases #957 rebase, git auto-mergedconstants.py, and the conflict was intests/test_k8s.py. fix(release): changelog fragments so concurrent pull requests never conflict on CHANGELOG.md or docs/ROADMAP.md #933 measuredCHANGELOG.mdand task files, not this file. - The cost is locality. A change to the review or to the RBAC audit also edits a 2,794-line file in another package, and an agent reading
ai/review/pipeline.pyhas to open that file to see its tables. The pre-commit hook (devops ci test,.pre-commit-config.yaml:61-67) runs the 35 test files that importdevops_cli.config.constantswhenever the file is staged (core/test_selection.py:85-110).
The open item that moves single-use constants to their consumer, #776, waits on this rule: "the move needs that rule changed ... until that is decided, only the first step is ready". This item makes that decision and adds the checks that hold it.
Acceptance criteria
- The rule in
src/devops_cli/ai/instruction_generator.py:301-304says: a string list, tuple or frozen set used for matching, classification or filtering is a named module-levelFinaltable next to its single owner, or inconfig/constants.pyorconfig/defaults.pyonce a second package imports it. When several modules of one package read a table, it lives in that package'sconstants.py. The rule names the audit query,rg -n '^_?[A-Z][A-Z0-9_]+(: [^=]+)? = (frozenset\(|tuple\(|set\(|\(|\[|\{)' src/devops_cli. The heading drops "Mandatory Constants/Defaults Placement". The two bullets on brittle pattern subsets above it are unchanged. -
AGENTS.md:21-24is edited by hand to the same heading and bullet, andgit diff AGENTS.mdchanges nothing else. It is not regenerated: at 38517a8devops ai agentsrewrites the whole curated file from a model or from the shorter template (commands/ai.py:919,ai/instruction_generator.py:412-427), which docs(agents): instruction surfaces state only what is true, anddevops ai agentsnever overwrites AGENTS.md #840 fixes. -
RELEASE_CYCLE.md:63-65anddocs/ROUTINE_TASKS.md:28and:100-103state the new rule or point to it.rg -n "constants\.py" RELEASE_CYCLE.md docs/ROUTINE_TASKS.mdfinds no sentence telling readers to centralise tables there. - Invariant 1,
config/holds shared names, intests/test_architectural_invariants.py. Every module-level name inconfig/constants.pyandconfig/defaults.pypasses if modules in two or more packages use it, withconfig/counting as one package, or if onlyconfig/uses it. A name used only to build anotherconfig/name takes that name's importers. A module that only re-exports a name (imports it and lists it in__all__, never reads it) does not count. An__init__.pythat reads a name counts in its own directory's package, asai/retries/__init__.pydoes forCONST_RETRYABLE_HTTP_STATUS_CODES. - Today's failures of invariant 1 are listed by package in
tests/fixtures/config_placement_baseline.json: about 870 single-package names in 46 packages, the 40CONST_ERROR_CODE_*names under a key of their own, which refactor(cli): exceptions carry their codes as class data, and one exit seam replaces 19 hand-rolled exits #1006 empties, and about 130 unused and 8 test-only names under their own keys. The test fails when an unlisted name fails invariant 1, so no new single-owner name lands inconfig/. It also fails when a listed name passes, so each move PR deletes its entries and the baseline only shrinks. - Invariant 2, owned tables stay owned, in the same file. A
CONST_*orDEFAULT_*name declared outsideconfig/is used only by modules of its own package, with re-exports excluded as above. Today one name fails:DEFAULT_SANDBOX_POLICY(sandbox/models.py:396), whichdocker/sandbox.py:59reads. This PR hasdocker/sandbox.pybuild its default withdefault_factory=SandboxPolicy. - A failure names the file, line, name and importing packages, and says where the name belongs.
- Both checks reuse one cached parse of
src/devops_cli, shared with_exporting_modules(tests/test_public_export_surface.py:104-108), which already parses every source module. Parsing the tree takes 2 to 3 s on the dev container, so the budget covers the checks themselves: at most 1 s beyond that parse, recorded fromuv run pytest tests/test_architectural_invariants.py tests/test_public_export_surface.py --durations=0. They run offline. -
uv run devops cipasses.
Key questions
- Does the rule keep its goal? (proposed) Yes. The goal is one place to audit tables for brittleness. A query meets it better than a file: the grep above lists the 192 tables in
constants.pyanddefaults.pyand the 285 outsideconfig/, which the file rule already misses. - What counts as a package, or "subsystem", in the invariants? (proposed) The importing module's parent package directory, so
commands/pr.pyandcommands/gh.pyare one package andai/review/is another. It follows from the file tree, with no hand-kept list of subsystems. - Where does a table go when two modules of one package read it? (proposed) In that package's
constants.py, created when first needed, asai/harness/constants.pyalready is. About 60 of the single-package names are shared this way. - Baseline as names or as counts? (proposed) Names, grouped by package, in one JSON file. A count would let a new single-owner name replace a moved one unseen. Grouping by package lets the move PRs delete separate blocks without conflicting.
- Do the invariants check
Final? (proposed) No. 37 of the 41 names outsideconfig/and 587 of the 595 indefaults.pylack it. The move items addFinalto each name they move, and mypy already rejects reassigning aFinalname. Enforcing it now would be a 600-line annotation change with no behaviour gain. - Should the 71 private-named string tables be renamed
CONST_*? (proposed) No. The audit grep matches module-level upper-case names, private or not, so renaming them buys nothing. - Does this item promise fewer rebases? (proposed) No. The measured
constants.pyedits merge cleanly. The gain is locality and an audit that covers every table. - Which names stay in
config/for good? (proposed) Those that two or more packages use (about 60 constants and 89 defaults today), names onlyconfig/uses, and theDEFAULT_*values behindSettingsfields, which refactor(config): a settings field is the one declaration, and the option, env and config-show registries become views of it #1000 keeps indefaults.py.
Depends on: none.
Order: lands before the move items, one per package group, which take over #776's second step. The owner accepted this rule on 2026-10-02; they are #1025, #1026, #1027, #1028, #1029, #1030, #1031, #1032. #776's first step (delete the config/__init__.py re-exports and the unused names) does not wait on it. #586 (v0.2.25) edits ai/instruction_generator.py and tests/test_architectural_invariants.py, #840 (v0.2.27) and #841 rewrite AGENTS.md and its template, #851 edits other template bullets, and #1007 edits the same docs/ROUTINE_TASKS.md:28 row. Each touches other lines; whichever lands second rebases.
Related: #776 (the moves, which waited on this rule), #840 (devops ai agents stops overwriting AGENTS.md), #1006 (CONST_ERROR_CODE_* become class data), #1000 (Settings-backed defaults stay in defaults.py), #1007 (moves help text next to its command, the same rule applied to lang/), #933 (shared-file conflicts, measured on CHANGELOG.md), #431 (what the matching lists contain).
Proposed design
Problem statement
The current rule in AGENTS.md requires all string lists, tuples, or frozen sets used for matching, classification, or filtering to be declared in config/constants.py or config/defaults.py. This rule is costly due to merge conflicts, locality issues, and audit inefficiencies. The goal is to allow tables to live next to their single owner and move to config/ only when a second package imports them.
Acceptance criteria
- Criterion 1:
src/devops_cli/core/config_placement.pyholds both checks as functions of parsed trees and a baseline mapping, with tmp_path trees proving each rule.
Verification: Run tests intests/test_architectural_invariants.pythat use tmp_path trees to verify the new checker functions. - Criterion 2:
test_the_source_tree_keeps_its_structural_invariantsruns both checks on the trees from_parse_src()and parses nothing else, with time increase under 1s.
Verification: Runuv run pytest tests/test_architectural_invariants.py --durations=0and verify duration difference is within 1 second. - Criterion 3: The baseline is generated at the PR's base and lists names by package, with about 1,090 single-package names in 50 packages.
Verification: Checktests/fixtures/config_placement_baseline.jsoncontains expected structure with package groupings. - Criterion 4: Invariant 2's one failure is
DEFAULT_SANDBOX_POLICYwhich is changed to useField(default_factory=SandboxPolicy).
Verification: Verifysrc/devops_cli/docker/sandbox.py:73usesField(default_factory=SandboxPolicy)forDEFAULT_SANDBOX_POLICY.
Key questions
- Does the rule keep its goal?: Yes. The goal is one place to audit tables for brittleness. A query meets it better than a file: the grep above lists the 192 tables in
constants.pyanddefaults.pyand the 285 outsideconfig/, which the file rule already misses. [sources: src/devops_cli/core/import_graph.py] - What counts as a package, or "subsystem", in the invariants?: The importing module's parent package directory, so
commands/pr.pyandcommands/release.pyare one package andai/review/is another. It follows from the file tree, with no hand-kept list of subsystems. [sources: AGENTS.md] - Where does a table go when two modules of one package read it?: In that package's
constants.py, created when first needed, asai/harness/constants.pyalready is. About 60 of the single-package names are shared this way. [sources: src/devops_cli/core/import_graph.py] - Baseline as names or as counts?: Names, grouped by package, in one JSON file. A count would let a new single-owner name replace a moved one unseen. Grouping by package lets the move PRs delete separate blocks without conflicting. (proposed) [sources: src/devops_cli/core/import_graph.py]
- Do the invariants check
Final?: No. 37 of the 41 names outsideconfig/and 587 of the 595 indefaults.pylack it. The move items addFinalto each name they move, and mypy already rejects reassigning aFinalname. Enforcing it now would be a 600-line annotation change with no behaviour gain. [sources: src/devops_cli/core/import_graph.py] - Should the 71 private-named string tables be renamed
CONST_*?: No. The audit grep matches module-level upper-case names, private or not, so renaming them buys nothing. (proposed) [sources: src/devops_cli/core/import_graph.py] - Does this item promise fewer rebases?: No. The measured
constants.pyedits merge cleanly. The gain is locality and an audit that covers every table. [sources: src/devops_cli/core/import_graph.py] - Which names stay in
config/for good?: Those that two or more packages use (about 60 constants and 89 defaults today), names onlyconfig/uses, and theDEFAULT_*values behindSettingsfields, which refactor(config): a settings field is the one declaration, and the option, env and config-show registries become views of it #1000 keeps indefaults.py. [sources: src/devops_cli/core/import_graph.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsReady
- StatusShow more project fieldsReady
Activity
dan-petty commentedon Oct 3, 2026
Consolidation (2026-10-03): the per-package moves stay separate PRs, as accepted on 2026-10-02. They are tracked with dependency links rather than sub-issues, because this item is a deliverable that lands first.
Proposed native links, for a person to set:
Exclusions recorded in the staged LINKS comments:
CONST_MODEL_ENDPOINT_MARKERSfor G6a.CONST_LOCAL_HOSTNAMESandCONST_LOCAL_DOMAIN_SUFFIXESfor fix(security): egress guards refuse cloud metadata in every numeric, NAT64 and provider form, classified by ipaddress and one maintained library #897 and fix(security): local names come from the public suffix list, and domains match on DNS labels, not string suffixes #887.Open key question: which one tool does every move PR use? Proposed: a libcst codemod or rope's move refactoring, chosen in the first move PR and reused after that, rather than hand edits.
This item ships two invariant tests, the baseline and a
docker/sandbox.pychange, so it is not documentation-only. A person may want to relabel it fromtype/docstotype/refactor.#1006 and #1007 stay related, not dependent.
AGENTS.md bullet shared with #1107. Lines cited at dcafadf.
#1107 and this item edit the same AGENTS.md bullet and its template copy, but not the same lines.
What #1107 changes
AGENTS.md:21-23with one "Parse With the Library" bullet. Those lines are the "Strict Prohibition of Brittle Pattern Subsets & Mandatory Constants/Defaults Placement" heading and its two brittle-subset sub-bullets. In the template the same lines areai/instruction_generator.py:301-303.:22goes. Data no library can know becomes a constant with its source cited: a cloud's published metadata addresses asipaddressobjects, or a vendor's published SSH host keys as its known_hosts lines, written to~/.ssh/known_hostsfor OpenSSH to check.:305-308).What #1107 leaves to this item
AGENTS.md:24, template:304) stays unchanged as its own bullet, headed "Matching Table Placement".devops ci, AGENTS.md makes the library the rule, and reviews stop discarding the findings #1107 states no placement rule. Its new bullet says only that moving a construct intoconfig/constants.pydoes not fix it, and it points to the placement bullet for where tables live.Order
devops ci, AGENTS.md makes the library the rule, and reviews stop discarding the findings #1107 has landed, read this item's criteria against the rebased text:git diff AGENTS.mdchanges nothing else" then cover feat(ci): hand-rolled URL and address parsing failsdevops ci, AGENTS.md makes the library the rule, and reviews stop discarding the findings #1107's bullet.devops ci, AGENTS.md makes the library the rule, and reviews stop discarding the findings #1107 rebases. It replaces only the heading and the two brittle-subset sub-bullets, and keeps this item's placement wording as the "Matching Table Placement" bullet.dan-petty commentedon Oct 18, 2026
Status set to Ready at 25e2cda (see proposed design in issue body).
docs(contributing): a matching table lives beside its one owner (#2492)