Skip to content

arch: add src/runtime scaffold + migration runbook (#2044)#2076

Open
yastman wants to merge 1 commit into
devfrom
arch/2044-runtime-scaffold
Open

arch: add src/runtime scaffold + migration runbook (#2044)#2076
yastman wants to merge 1 commit into
devfrom
arch/2044-runtime-scaffold

Conversation

@yastman
Copy link
Copy Markdown
Owner

@yastman yastman commented May 22, 2026

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.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 also creating the package on its first PR.

Changes

What this PR does NOT do

Verification

uv run pytest tests/contract/test_layering_no_telegram_bot_imports_contract.py -q   # 4 passed
uv run pytest tests/contract/ -q                                                     # 1095 passed
uv run python -c 'import src.runtime'                                                # OK
uv run python scripts/check_markdown_links.py                                        # OK
uvx ruff check src/runtime/                                                          # OK

Closes #2044

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

arch: create src/runtime scaffold and layering ratchet contract (#1948/#1265)

2 participants