arch: add src/runtime scaffold + migration runbook (#2044)#2076
Open
yastman wants to merge 1 commit into
Open
Conversation
Parent: #1948 (reverse layering). Related: #1265. The ratchet contract test for #1948 is already on dev: - tests/contract/test_layering_no_telegram_bot_imports_contract.py - tests/data/known_layering_violations.json (5 entries, all in src/api/main.py) What is missing is the destination package the migration slices (#2045 phase 1, #2047 phase 3, #2049 cleanup) need to land into. This PR adds the scaffold so each follow-up slice can do a single git mv without having to also create the package on its first PR. Adds: - src/runtime/__init__.py — module docstring explaining the package role: this is the destination kernel. Imports as a working empty namespace; future slices fill it via git mv. - src/runtime/README.md — migration runbook with the per-phase plan (#2045/#2047/#2049), the per-slice procedure (git mv → update callers → add compat shim → drop allowlist row → run contract), and an explicit list of what this scaffold PR does NOT do (no module move, no behaviour change, no contract change). This PR intentionally introduces ZERO behaviour: importing the package yields an empty namespace, the existing ratchet allowlist is unchanged, and no telegram_bot/* module is touched. The contract test passes: uv run pytest tests/contract/test_layering_no_telegram_bot_imports_contract.py -q 4 passed uv run pytest tests/contract/ -q 1095 passed, 4 skipped, 3 xfailed uv run python -c 'import src.runtime' OK uv run python scripts/check_markdown_links.py All relative Markdown links OK. uvx ruff check src/runtime/ All checks passed! Closes #2044
This was referenced May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request was created by @kiro-agent on behalf of @yastman 👻
Comment with /kiro fix to address specific feedback or /kiro all to address everything.
Learn about Kiro autonomous agent
Summary
Parent: #1948 (reverse layering). Related: #1265.
The ratchet contract test for #1948 is already on
dev:tests/contract/test_layering_no_telegram_bot_imports_contract.pytests/data/known_layering_violations.json(5 entries, all insrc/api/main.py)What is missing is the destination package the migration slices (#2045 phase 1, #2047 phase 3, #2049 cleanup) need to land into. This PR adds the scaffold so each follow-up slice can do a single
git mvwithout also creating the package on its first PR.Changes
src/runtime/__init__.py— module docstring explaining the package role: this is the destination kernel. Imports as a working empty namespace; future slices fill it viagit mv.src/runtime/README.md— migration runbook with the per-phase plan (arch: extract pure shared runtime modules to src/runtime (#1948 phase 1) #2045 / arch: migrate coupled runtime modules cache, qdrant, and graph (#1948 phase 3) #2047 / arch: remove reverse-layering allowlist and verify mini_app separability (#1948 cleanup) #2049), the per-slice procedure (git mv→ update callers → add compat shim → drop allowlist row → run contract), and an explicit list of what this scaffold PR does not do.What this PR does NOT do
src.runtimeimports as an empty namespace.tests/data/known_layering_violations.jsonand the ratchet test are untouched.Verification
Closes #2044