|
| 1 | +# SDK CI Test-Runner Hardening |
| 2 | + |
| 3 | +Date: 2026-07-11 |
| 4 | +Agent: SDK hardening lane |
| 5 | +Repo: `runinfra-sdk` |
| 6 | +Worktree: `runinfra-sdk-ci-hardening-20260711` |
| 7 | +Branch: `fix/sdk-ci-hardening-20260711` |
| 8 | + |
| 9 | +## Goal |
| 10 | + |
| 11 | +Make every complete Python CI, publish, and contributor test command run the |
| 12 | +stdlib `unittest` suite from `python/`, so test imports resolve to the checkout |
| 13 | +under test instead of an installed package or sibling worktree. Preserve the |
| 14 | +existing package/runtime surface and trusted-publishing policy. |
| 15 | + |
| 16 | +Done means the Python suite, TypeScript suite, build, workflow/version/surface |
| 17 | +policy checks, and diff check pass from a fresh branch based on current |
| 18 | +`origin/main`; an independent hostile review finds no blocker; and the result |
| 19 | +is committed locally without pushing. |
| 20 | + |
| 21 | +## Initial Verified State |
| 22 | + |
| 23 | +- Fresh base: `b9e09353da858cdc5ec53a3600a1f345a89ee038` (`origin/main`). |
| 24 | +- The dirty detached SDK checkout and old PR #15 worktree are untouched. |
| 25 | +- `python -m unittest discover -s tests -v` from `python/` passed all 158 tests. |
| 26 | +- Two focused TypeScript policy regressions fail on the unmodified base: |
| 27 | + stale pytest-version expectations and an LF-only publish-workflow mutation |
| 28 | + that does not match Windows CRLF files. |
| 29 | +- npm and PyPI both report `0.2.0` as latest. |
| 30 | +- GitHub publish run `27575407723` published 0.2.0 with |
| 31 | + `require_live_canary=false`; strict live-canary steps were skipped under the |
| 32 | + documented infrastructure-unavailable override, while build, unit, |
| 33 | + packaging, security, trusted-publish, and registry-install gates ran. |
| 34 | + |
| 35 | +## Scope |
| 36 | + |
| 37 | +- Existing CI and publish workflow Python test steps. |
| 38 | +- Python development requirements. |
| 39 | +- Pull-request and contributor test commands. |
| 40 | +- TypeScript policy regressions for Python tooling and Windows CRLF. |
| 41 | +- The slow Python artifact-failure test timeout, isolated as its own concern. |
| 42 | +- `AGENT-NOTES.md` release-state accuracy for 0.2.0. |
| 43 | + |
| 44 | +## Out Of Scope |
| 45 | + |
| 46 | +- SDK runtime behavior or public API changes. |
| 47 | +- Money, pricing, billing, or credit semantics. |
| 48 | +- Live-canary activation, infrastructure provisioning, publishing, pushing, |
| 49 | + or merging. |
| 50 | +- Reusing or updating the old PR #15 branch. |
| 51 | + |
| 52 | +## Guardrails |
| 53 | + |
| 54 | +- Use the existing implementation paths, with no feature flag or parallel |
| 55 | + runner. |
| 56 | +- Add no package dependency. |
| 57 | +- Stage explicit files only and commit with `git commit -F`. |
| 58 | +- Do not push or merge from this lane. |
| 59 | + |
| 60 | +## Checkpoint |
| 61 | + |
| 62 | +Implementation is complete on local branch |
| 63 | +`fix/sdk-ci-hardening-20260711`, based on |
| 64 | +`b9e09353da858cdc5ec53a3600a1f345a89ee038` (`origin/main`). The implementation |
| 65 | +HEAD is `ae4b5fcde541ac50f8895d42c8008cd6f4c0fa95`. |
| 66 | + |
| 67 | +Commits, oldest first: |
| 68 | + |
| 69 | +- `5f0fb6f0de49ab17cdcd1ba15bd252d3771f23b1` - cwd-safe stdlib Python runners. |
| 70 | +- `3c1823ef937283f85f5d8e2978e8fd9b2cf05c76` - Windows CRLF-safe policy mutation. |
| 71 | +- `06d0878a8727365c8c0b1346dc9aa4805bb2e12d` - isolated slow artifact-test timeout. |
| 72 | +- `cf6c150e80d95b64d19813769c74df0f4b9f41e8` - accurate 0.2.0 release evidence. |
| 73 | +- `f71b2c3d637d3c030fc7c48b1cdd43ee2cf05639` - close hostile-review gaps. |
| 74 | +- `ae4b5fcde541ac50f8895d42c8008cd6f4c0fa95` - preserve strict canary wording. |
| 75 | + |
| 76 | +Verified on the exact implementation HEAD: |
| 77 | + |
| 78 | +- Python 3.14.2 from `python/`: discovery guard found 158 tests; all 158 passed. |
| 79 | +- An empty-directory discovery probe exited 1, proving the guard rejects zero tests. |
| 80 | +- A fresh virtual environment installed the revised development requirements, |
| 81 | + had no pytest package, and passed all 158 stdlib `unittest` tests. |
| 82 | +- TypeScript: all 258 Vitest tests passed, including workflow, cwd mutation, |
| 83 | + Windows CRLF, release-evidence, and isolated-timeout regressions. |
| 84 | +- TypeScript no-emit typecheck and build passed. |
| 85 | +- Workflow policy, version sync, public-surface coverage, secret scan, Python |
| 86 | + compileall, and `git diff --check` passed. Surface coverage reported zero |
| 87 | + uncovered surfaces and zero uncovered rows. |
| 88 | +- The declared CI matrix remains Python 3.9 through 3.14. Only Python 3.14.2 |
| 89 | + was executable locally; the stdlib runner and guard are 3.9-compatible, but |
| 90 | + Python 3.9 through 3.13 still require the remote CI matrix after integration. |
| 91 | +- A fresh fetch found `origin/main` unchanged at the base SHA. The branch was |
| 92 | + six commits ahead and zero behind, so no rebase was required at that point. |
| 93 | + |
| 94 | +The first independent hostile review returned BLOCK with three findings: |
| 95 | +the CONTRIBUTING cwd mutation was not coupled to the command block, |
| 96 | +`LIVE-CANARIES.md` contradicted the documented override, and Python 3.11 raw |
| 97 | +discovery could pass with zero tests. All three were fixed and covered by |
| 98 | +regressions. A focused independent rereview of the exact committed range |
| 99 | +`b9e09353..ae4b5fc` then returned `RELEASE`: all three findings were closed and |
| 100 | +no remaining material issue was found. CodeRabbit was unavailable locally, so |
| 101 | +both hostile reviews used the configured read-only Codex reviewer. |
| 102 | + |
| 103 | +No push, merge, publish, registry mutation, live canary, deployment, or money |
| 104 | +change was performed. The old PR #15 worktree and dirty main checkout remain |
| 105 | +untouched. |
0 commit comments