Skip to content

refactor: extract smoke workspace table to config/repos.yaml + firewall gate - #147

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/tenant-firewall-drift-aug
Aug 17, 2026
Merged

refactor: extract smoke workspace table to config/repos.yaml + firewall gate#147
Jammy2211 merged 2 commits into
mainfrom
feature/tenant-firewall-drift-aug

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

The PyAutoHeart leg of PyAutoLabs/PyAutoMind#198 (tenant-firewall drift: refactor-first clear + PR-time gates). Merges after PyAutoLabs/PyAutoMind#199 — the new CI gate step invokes the --only selector from a PyAutoMind checkout of main, so that step stays red until that PR lands (expected; noted in the #198 sequencing comment).

Changes

Clears the three PyAutoHeart firewall findings by the recorded decision rule — extract, don't allowlist:

  • heart/smoke.py: WORKSPACES + IMPORT_NAMES move to a new smoke: block in config/repos.yaml — the declared config surface an adopting fork replaces — behind a strict loader on the version_skew idiom (workspace_library()): a missing block raises KeyError rather than silently preparing nothing. Which workspaces exist is instance policy, not runner mechanics; behaviour is unchanged for every existing invocation (keys, directories, chains identical). The residual --root argparse help is reworded to "organism root". bin/pyauto-heart help smoke prose now points at the config block instead of hardcoding the six keys.
  • tests/test_smoke.py → synthetic LibraryA/LibraryB chains under an organism root: nothing in smoke.py matches a spec against a real repo list.
  • tests/test_release_run.pyper_project key demo_workspace: merged generically, never matched.

Gate (Phase B):

  • .github/workflows/heart-tests.yml restructures from a bare root checkout to path: PyAutoHeart + a PyAutoLabs/PyAutoMind sibling (the layout --root needs), moves pip/pytest under working-directory:, and adds the firewall step: repos_sync.py --check --only "tenant firewall (organ code)" --root "$GITHUB_WORKSPACE".

The identity of the new smoke: block is drift-checked against the body map by the check_heart extension in PyAutoLabs/PyAutoMind#199 (closing the same identity-unchecked gap version_skew: had).

Verification

  • Heart pytest: 469 passed (full suite).
  • PYTHONPATH=. python3 -m heart.smoke --help → workspace choices load from config, identical key set.
  • PYAUTO_ROOT=<root> python3 heart/checks/manifest_drift.py"manifest_drift identity in sync (11 surfaces vs repos.yaml)" against the branch trio.
  • Negative probe: a bad repo name in the smoke: block is flagged by the new check_heart leg (exit 1).

Generated by Claude Code

…ll gate

Clears the three PyAutoHeart tenant-firewall findings by the recorded
decision rule (PyAutoMind#198):

- heart/smoke.py: WORKSPACES + IMPORT_NAMES move to a smoke: block in
  config/repos.yaml — the declared config surface an adopting fork
  replaces — behind a strict loader (the version_skew idiom: a missing
  block fails loudly). Which workspaces exist is instance policy, not
  runner mechanics. Residual --root help reworded to 'organism root'.
- tests/test_smoke.py: synthetic LibraryA/LibraryB chains under an
  'organism' root — nothing matches a spec against a real repo list.
- tests/test_release_run.py: per_project key -> demo_workspace — merged
  generically, never matched.

heart-tests.yml restructures to a path-based checkout with a PyAutoMind
sibling and gains the repos_sync.py firewall leg via its new --only
selector, so future instance-fact drift fails in the PR that authors it.
Note: the gate step needs the --only selector on PyAutoMind main — merge
after the PyAutoMind PR.
@Jammy2211
Jammy2211 merged commit 642fa0d into main Aug 17, 2026
2 checks passed
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.

2 participants