Repository navigation
spec: runtime preflight, so a machine's own Python 2 programs aren't silently broken - #73
Conversation
…silently broken wend facts now lists the machine's Python 2 users (running processes, cron jobs, and anything with libpython2 loaded, such as mod_wsgi), with the package that owns each program. Programs no package owns, and embedded interpreters, are the machine's own; the distro's own Python 2 tools are carried by the route and don't count. Each adapter gets [runtimes.<release>] python2 = [...] for every release a route boots into, read from the releases' own indexes by tools/runtimes.py: Debian through bullseye, Ubuntu through jammy (universe), EL through EL8, which wend's EL routes never land on, so EL7 stops at CentOS 7. preflight adds runtime_problems per hop and keeps_runtimes_on, and when Python 2 goes before the hardware stops, offers the choice: stop there, or shelter the programs (SPEC "Sheltering an app", next) and go on. Facts schema is now wend.hardware/2; older facts files are refused rather than read as "no Python 2". Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_016XrCggTfrYZFPiDyPrhqLF Signed-off-by: Claude <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Changes requested on e69e0a9 I checked the CI steps locally on this sha and all of them pass: Two silent false negatives block this. In both, preflight reports "This machine can land on …" and exits 0 on a machine whose own Python 2 code the route will break, which is the exact outcome this PR exists to prevent. Blocking1. Running preflight as a normal user silently finds no Python 2.
Scenario: a CentOS 7 box where
2. On EL5 and EL6, cron jobs that run
Non-blocking
Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e69e0a923d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- refuse to gather facts as non-root: a normal user can't read other users' /proc/PID/exe and maps or their crontabs, and would quietly see no Python 2 - EL5/EL6 /usr/bin/python is a hard link to python2.N: match the sibling by inode, so a second Python (EPEL python26, python34) doesn't hide it - skip processes in containers (a root of their own) - cron: honor the crontab's own PATH=, resolve ./job after a cd, and default to cron's /usr/bin:/bin - a hop with runtime problems is not ok in the JSON either - SPEC: keeps_runtimes_on when no hop drops Python 2; README: run as root Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_016XrCggTfrYZFPiDyPrhqLF Signed-off-by: Claude <[email protected]>
|
This answers the review on e69e0a9. The changes are in dbcfeaf, which isn't pushed yet. Blocking:
Non-blocking, taken:
Non-blocking, left as is:
All three of those err toward flagging, never toward a silently broken app. Generated by Claude Code |
|
Signed off on dbcfeaf I re-reviewed CI steps rerun on dbcfeaf, all green:
Both earlier blockers are fixed:
The non-blocking fixes taken also look right:
Non-blocking notes, none of which need to hold the merge:
Generated by Claude Code |
Union with main's filesystem preflight (mounts): runtime tables follow main's new driver hashes and boot_mib; the verdict checks mounts then runtimes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_016XrCggTfrYZFPiDyPrhqLF Signed-off-by: Claude <[email protected]>
|
Signed off on 8a32b7b This review covers only the merge of main (332fda8) into dbcfeaf, which I signed off earlier. I read
CI steps rerun at 8a32b7b in a separate worktree, all green:
One nit, not blocking: the resolution added an extra blank line at the end of Generated by Claude Code |
Requested by Peter · project thread
What this adds
A spec change, not a route. It adds SPEC "Runtime preflight": the adapters get a
[runtimes]table, there's a new maintainer tooltools/runtimes.py, both checkers validate the table, and the client adds facts and a verdict.Before:
wend preflightjudged only the hardware. A CentOS 7 box whose billing app runs on Python 2 was told "can land on alma10", and the app would die on the hop to alma9.After:
wend facts(nowwend.hardware/2) lists the box's Python 2 users: running processes, cron jobs, and anything withlibpython2mapped (mod_wsgi in httpd), each with the package that owns its program. A user counts as the machine's own when no package owns its program, or when the interpreter is embedded. The distro's own Python 2 tools (yum, firewalld, fail2ban) don't count, because the route carries their packages. When the route drops Python 2 before the hardware stops, preflight offers a choice: stop at the last release that ships it, or shelter the programs and go on. The shelter design is the next spec PR. Nothing overrides a runtime problem.How: each booted release's
python2 = [...]versions come from the release's own index, not from docs. Debian ships Python 2 through bullseye (2.7.18), Ubuntu through jammy (universe, 2.7.18), and EL through EL8 (the python27 module). wend's EL routes never land on EL8 (may_skip), so an EL7 box's stop is CentOS 7 itself. Facts files from the old schema are refused, so a missingruntimeslist is never read as "no Python 2".Claims issue: none
Model
None. Hand-written in the dep-lab project thread.
Evidence
python3 wend check: ok.tools/test_check.py: 4 new broken adapter cases, all refused.cargo fmt --check,cargo clippy --all-targets -- -D warningsandcargo testall pass (35 tests, 5 new: detection on a fixture /proc and root, plus EL7, Ubuntu, Debian 2.4-note and hardware-first verdicts).client/parity.py: identical./opt/billing/app.py(relative argv, resolved from cwd),python -m SimpleHTTPServer, the cron job/opt/billing/nightly.py(#!/usr/bin/env python) and httpd with mod_wsgi (/usr/lib64/libpython2.7.so.1.0, embedded). It recorded/usr/lib64/python2.7/SimpleHTTPServer.pyas owned bypython-libs, so that one doesn't count.Self-review
🤖 Generated with Claude Code
https://claude.ai/code/session_016XrCggTfrYZFPiDyPrhqLF
Generated by Claude Code