Skip to content

Modernize packaging + add CI, and fix two bugs it surfaced - #4

Merged
thorwhalen merged 3 commits into
mainfrom
claude/rollout-modernize
Aug 7, 2026
Merged

Modernize packaging + add CI, and fix two bugs it surfaced#4
thorwhalen merged 3 commits into
mainfrom
claude/rollout-modernize

Conversation

@thorwhalen

Copy link
Copy Markdown
Member

Rollout pass over this repo.

  • Packaging: complete the [project] metadata (SPDX license, classifiers, urls, testpaths), add the Apache-2.0 LICENSE the metadata was already claiming, and the standard .editorconfig.
  • CI: the repo had none — added the wads uv-CI stub.
  • fix(scaffold): stateless_http was accepted by the scaffolder but never carried into the generated server.py, so the generated server silently ignored it.
  • test(deploy): the exec-bit assertion is POSIX-only; it was failing the new Windows CI leg.

https://claude.ai/code/session_01Uz2YYxAfa1DX8UcCDmeKC5

This repo had a pyproject.toml but no CI at all — nothing tested or
published it. Bring it onto the ecosystem standard.

CI
- Add .github/workflows/ci.yml as the 5-line wads stub calling the
  reusable workflow i2mint/wads/.github/workflows/uv-ci.yml@master, with
  the secrets pass-through rendered from [tool.wads.ci.env] (PYPI_PASSWORD
  only — this package needs no test-time secrets).
- [tool.wads.ci] project_name set explicitly (was relying on the fallback);
  [tool.wads.ci.install] extras = "dev" so CI installs .[dev];
  [tool.wads.ci.testing] python_versions = 3.10 / 3.12, coverage on.
- [tool.wads.ci.publish] enabled = false. enlace_connector has never been
  published to PyPI under this name; first publication should be a
  deliberate decision, not a side effect of merging this PR. Same pattern
  already used by other unpublished packages in the ecosystem.

testpaths
- Was ["tests"]. wads CI runs `pytest --doctest-modules` with no path
  argument, so collection is driven entirely by testpaths — the package's
  own doctests would have run nowhere while CI still reported green. Now
  ["enlace_connector", "tests"]. Verified locally: package collection is
  clean (no hangs, no failures) and the suite is 19 passed.
- doctest_optionflags now mirrors what wads' run-tests-uv forces in CI
  (ELLIPSIS, IGNORE_EXCEPTION_DETAIL) so local and CI agree.

Packaging metadata
- license: replaced the deprecated [project.license] table with the SPDX
  string form. Built wheel now carries License-Expression: Apache-2.0.
- Added the matching Apache-2.0 LICENSE file (there was none), classifiers,
  and Repository / Documentation urls.

Lint
- [tool.ruff] gains the ecosystem-standard exclude list, google pydocstyle
  convention, per-file-ignores and ignore list. E501 moves to ignore
  (line length is the formatter's job, and CI runs an unpinned `uvx ruff`,
  so this is the main source of unrelated CI reds). The stricter select
  the repo already had (E, F, W, I, D100) is kept as-is.

Dependencies were cross-checked with wads-deps and are correct as declared:
py2mcp is a real (lazily imported) runtime dep, and uvicorn belongs in the
`serve` extra because it is what the generated systemd unit / app.toml
command invokes in the deployed connector's own venv.

Claude-Session: https://claude.ai/code/session_01VipiLaG4xy7WctqY9w2475
`render_server_py` rebuilt the ConnectorSpec in the generated module from
only name/tools/auth/title/route. `make_connector_app` also reads
`spec.stateless_http` and passes it to py2mcp's `mk_http_app`, so a spec
declared with `stateless_http=False` silently produced a *stateless*
connector once deployed — the generated SPEC fell back to the field
default. Nothing surfaced the discrepancy: the scaffold tests only
checked that the module compiled and mentioned the tools.

Emit the field, and document in the docstring which spec fields are
serve-time (must round-trip through server.py) versus deploy-time
(consumed by the provisioning bundle instead). Added a regression test
covering both the non-default and the default value.

Claude-Session: https://claude.ai/code/session_01VipiLaG4xy7WctqY9w2475
The new CI's Windows job surfaced this: `test_generate_deploy_bundle_
writes_all_artifacts` asserted `st_mode & 0o111` on the generated
provision script, which can never hold on Windows — NTFS has no POSIX
execute bit and `Path.chmod` there only toggles the read-only flag. The
repo had no CI before, so nothing had ever run the suite on Windows.

The production code is right as it stands: the provision script is a bash
script that runs as root on the Linux server, and `chmod(0o755)` is the
correct thing to do wherever the filesystem can express it. It is the
*assertion* that is not portable, so it moves into its own test guarded by
`skipif(os.name == "nt")` with the reason spelled out.

While there, the bundle test now also checks that the returned path map
matches the files actually written, instead of leaving `out` unused.

Claude-Session: https://claude.ai/code/session_01VipiLaG4xy7WctqY9w2475
@thorwhalen
thorwhalen merged commit c95eedf into main Aug 7, 2026
12 checks passed
@thorwhalen
thorwhalen deleted the claude/rollout-modernize branch August 7, 2026 08:25
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.

1 participant