feat: log coglet build info and SDK version at startup#2829
Merged
michaeldwan merged 4 commits intomainfrom Mar 12, 2026
Merged
feat: log coglet build info and SDK version at startup#2829michaeldwan merged 4 commits intomainfrom
michaeldwan merged 4 commits intomainfrom
Conversation
Print coglet version, git sha, dirty flag, build time, and debug/release mode to logs on boot. Also log cog SDK and Python versions. Expose git_sha and build_time in the /health-check response so running containers can be identified without log access. Add COGLET_GIT_DIRTY to build.rs and track .git/index for rebuild on staging changes.
Align with naming convention: 'cog' is the suite, 'coglet' is the in-container server, 'python_sdk' is the SDK models are built on.
clean:go was removing ./cog (legacy path) but build:cog outputs to dist/go/*/cog, so 'mise clean && mise build' left a stale CLI binary. Also add a _build_summary task that prints artifact paths and versions after 'mise build'.
markphelps
approved these changes
Mar 12, 2026
michaeldwan
added a commit
that referenced
this pull request
Apr 7, 2026
Stubs drifted after the BuildInfo.dirty field was added in #2829 and docstring updates in recent PRs. Regenerated with `mise run generate:stubs`.
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Apr 8, 2026
* ci: add stub freshness check to CI The generate:stubs mise task and stub:check already exist but weren't enforced in CI, so .pyi stubs could drift when Rust source changed. Adds a check-stubs job that runs `mise run --force stub:check` on Rust changes, using --force to bypass sources/outputs mtime freshness (which would skip regeneration in CI's fresh checkout). * chore: regenerate coglet Python stubs Stubs drifted after the BuildInfo.dirty field was added in #2829 and docstring updates in recent PRs. Regenerated with `mise run generate:stubs`. * fix(ci): set LD_LIBRARY_PATH for stub_gen in check-stubs stub_gen is a PyO3 binary that dynamically links libpython. setup-uv installs Python to a non-standard path, so the shared library isn't on LD_LIBRARY_PATH by default. Query sysconfig for the correct LIBDIR. * fix: restore dict[str, str] return type for Scope.context stub Regression from #2853: the context property returns Py<PyDict> which pyo3-stub-gen infers as bare `dict`. Add an override_return_type annotation so the generated stub preserves the intended dict[str, str] contract. * fix(ci): use setup-python for shared libpython in check-stubs stub_gen needs libpython3.x.so at runtime (PyO3 auto-initialize). setup-uv's python-build-standalone is statically linked and doesn't ship the .so, causing 'cannot open shared object file' at runtime.
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.
Summary
git_shaandbuild_timein/health-checkresponse for identifying running containers without log accesscogtopython_sdkinVersionInfoto align with naming convention (cog = suite, coglet = in-container server, python_sdk = SDK models are built on)Startup log output
/health-checkresponse{ "status": "READY", "version": { "coglet": "0.17.0-rc.1", "git_sha": "abc1234-dirty", "build_time": "2026-03-12T18:00:00Z", "python_sdk": "0.17.0rc1", "python": "3.12.0" } }Changes
crates/coglet-python/build.rs— AddCOGLET_GIT_DIRTYenv var; track.git/indexfor rebuild on staging changescrates/coglet-python/src/lib.rs— Adddirtyfield toBuildInfo; enhanced startup log; log SDK/Python versions; wire build info intoVersionInfocrates/coglet/src/version.rs— Add optionalgit_shaandbuild_timefields toVersionInfo; renamecogfield topython_sdkTesting
git_shaandbuild_timepresent in/health-checkresponse