Repository navigation
fix - #629
Merged
Merged
fix#629
Conversation
The first build.yml run (42091334383) failed every job. Two unrelated causes.
The wheel job was my bug. The smoke test runs from RUNNER_TEMP so the
repository's own `navconfig/` directory cannot shadow the installed wheel --
but `from navconfig import config` triggers the lazy bootstrap, which calls
project_root() and needs a project to detect. There is deliberately no project
in RUNNER_TEMP, so that line could only ever fail. Drop it: the job asserts
wheel integrity, i.e. that the seven compiled extensions load on this
platform. `__version__` is imported eagerly, so reading it is bootstrap-free.
The same latent failure sits in release.yml's test-install, which has no
checkout at all and therefore no project either. It was silently failing until
`continue-on-error: true` came off that step, so a real release would now go
red after publishing correctly. Fixed the same way, and it now also asserts
the extensions load rather than only reading a version string.
The tests job failure is pre-existing and not about wheels: tests/test_config.py
and tests/test_kardex_vault.py cannot be COLLECTED on a clean checkout
("NavConfig initialization failed: environment assets are missing"), because
they need an `env/<environment>/.env` scaffold and `env/` is gitignored and
absent from the repository. Collection aborting took the whole suite with it.
Skip those two modules for now, with the reason recorded in the workflow;
wiring CI to scaffold an env is follow-up work. The remaining 102 tests run in
3.4s instead of 302s -- the old runtime was entirely those two modules doing
real Vault I/O against the developer's own configuration -- and they are
coverage this repository has never had on any platform.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…Windows
Run 42092802960 got the tests job green on Linux and macOS but left all 15
wheel jobs failing, and my previous attempt at the smoke test was wrong about
why.
navconfig cannot be imported at all without a project. `navconfig/logging/
__init__.py:17` does `from navconfig import config, BASE_DIR`, which trips the
lazy bootstrap and calls project_root(). So dropping `from navconfig import
config` did not help: importing `navconfig.logging.logger` reaches the same
code path. Worse, project detection is anchored on the INSTALLED package's
location (site-packages upward), never the working directory, so scaffolding
a project next to the test does nothing on its own -- SITE_ROOT has to point
at it. Verified against the real wheel in an isolated interpreter with no
editable install: scaffold alone fails, SITE_ROOT alone fails (it then wants
env/<env>/.env), scaffold plus SITE_ROOT succeeds.
Both smoke tests now scaffold with `python -m navconfig.cli env create` and
export SITE_ROOT, then assert the version, all seven compiled extensions, and
the config bootstrap. `python -m` rather than the `kardex` console script so
the check does not also depend on the scripts directory being on PATH.
Separately, three Windows test failures (99 passed, 3 failed) were a
pre-existing bug in the test suite, invisible until it first ran on Windows.
tests/test_cli.py and tests/test_cli_env.py build a scrubbed subprocess
environment as `{"PATH": "/usr/bin:/bin", "SITE_ROOT": ...}` -- a hardcoded
POSIX PATH and nothing else. On Windows CPython cannot initialise without
SystemRoot, which it needs to reach the crypto provider that seeds hash
randomisation, so the child died with `_Py_HashRandomization_Init: failed to
get random numbers to initialize Python` before any project code ran. Both
files now build that environment through a `_cli_env()` helper that keeps the
scrubbing intent while passing through the handful of OS-level variables the
interpreter itself requires.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…eels ci: fix the build.yml smoke test and scope the suite to a clean checkout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.