Adopt capsize_commons.logging in spikeforge (B″, hq#3) - #52
Merged
Merged
Conversation
Delete the private §14 JSON formatter and render through
capsize_commons.logging.JsonFormatter(message_key="event",
identifier_fields=("run_id", "config_id", "config_hash")), which
reproduces spikeforge's payload keys and values exactly.
Clear the import blocker so the logging surface is importable without
the ML stack: spikeforge/__init__.py and spikeforge/observability/__init__.py
now resolve their eager torch/metrics imports lazily (PEP 562). Importing
spikeforge.observability.logging_setup no longer pulls torch or snntorch;
LOGGER_NAME and the "event" key are unchanged.
Declare capsize-commons>=0.1.1 on the core distribution (logging is part
of its base install), update the packaging dependency pin in
test_packaging_profiles.py, and refresh documentation/project-layout.md.
Refs Capsize-Games/hq#3
Member
Author
Compensating local run — recorded owner-approved bypass (hq#14)Owner decision on Capsize-Games/hq#14: option 1 (path-filtering) + a recorded one-off bypass for this PR and airunnerweb#280. No red check is merged past — this PR is 0 failed; it is blocked only by the queued Compensating run, this worktree,
The full suite still requires the ML stack and is not run here (documented in the PR body). |
w4ffl35
added a commit
that referenced
this pull request
Sep 19, 2026
`#52` added `capsize-commons>=0.1.1` to the core dependencies for §14 logging, but `capsize-commons` requires Python >=3.11. The declared floor and the classifiers still said 3.10, and `test (3.10)` now fails at install: ERROR: Could not find a version that satisfies the requirement capsize-commons>=0.1.1 ... Ignored the following versions that require a different python version: 0.1.1 Requires-Python >=3.11 The failure was masked because #52 was merged on a clause-8 bypass without its checks completing; running the job exposed it. Raise `requires-python` to >=3.11, drop the 3.10 classifier, and drop the 3.10 CI matrix cell. Refs Capsize-Games/hq#3 Capsize-Games/hq#14
w4ffl35
added a commit
that referenced
this pull request
Sep 19, 2026
* ci: run the required checks on GitHub-hosted runners (hq#14) The five *required* jobs (`lint`, `test (3.12)`, `core-boundary`, `published-surfaces`, `packaging-guards`) move from the three self-hosted runners to `ubuntu-latest`. spikeforge is public, so hosted minutes are free, and this takes the merge gate off the queue that has cost three waves (observed: spikeforge#52 queued 32+ min with zero progress; the last full run took 2h17m). The seven non-required heavy jobs stay on the self-hosted pool; they no longer sit in front of a merge. Refs Capsize-Games/hq#14 * fix(packaging): drop Python 3.10, which the core can no longer support `#52` added `capsize-commons>=0.1.1` to the core dependencies for §14 logging, but `capsize-commons` requires Python >=3.11. The declared floor and the classifiers still said 3.10, and `test (3.10)` now fails at install: ERROR: Could not find a version that satisfies the requirement capsize-commons>=0.1.1 ... Ignored the following versions that require a different python version: 0.1.1 Requires-Python >=3.11 The failure was masked because #52 was merged on a clause-8 bypass without its checks completing; running the job exposed it. Raise `requires-python` to >=3.11, drop the 3.10 classifier, and drop the 3.10 CI matrix cell. Refs Capsize-Games/hq#3 Capsize-Games/hq#14
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.
Closes Capsize-Games/hq#3 (B″). Deletes the duplicated
observability/json_formatter.pyand renders throughcapsize_commons.logging.JsonFormatter.Changes
spikeforge/observability/json_formatter.py;logging_setup.pynow buildsJsonFormatter(message_key="event", identifier_fields=("run_id","config_id","config_hash")).LOGGER_NAMEand theeventkey are unchanged.spikeforge/__init__.pyandspikeforge/observability/__init__.pyresolve their eager imports lazily (PEP 562). The issue's blocker note named the chain (spikeforge/__init__.py → torch) and the observability eager imports; fixing only the latter would not have made the logging surface torch-free, so both were made lazy. Public names are preserved (verified below).capsize-commons>=0.1.1on the core distribution, plus the exact-pin update intest_packaging_profiles.pyanddocumentation/project-layout.md.Acceptance criteria
import spikeforge.observability.logging_setup—torch/snntorchnot insys.modules; all 7__all__names presentjson_formatter.pydeleted, callers use the librarylogging_setup.py) switched;message_key="event"+ 3 identifier fieldspytest tests/test_observability_logging.pypassescapsize-commonsdeclared; ruff+mypy cleanLOGGER_NAMEstill importable from...logging_setupBehaviour-parity artefact
Same log record (
train.started,run_id=run-1,config_hash=abc,fields={"epoch":2}), timestamp frozen:json.loads(before) == json.loads(after)→ True. The only difference is JSON key order (loggernow precedesevent); JSON objects are unordered, so this is not a semantic change.Edge deltas found by direct comparison (reported, not hidden):
fields={}"fields": {}emittedexc_infosetexceptionkey"exception": "<traceback>"added\u00e9-escaped (ensure_ascii=True)ensure_ascii=False)All are additive or parse-equivalent; none renames
eventor drops a correlation field.Test results
tests/test_observability_logging.py→ 5 passed (torch-free venv,capsize-commons==0.1.1).ModuleNotFoundError: torchon collection (the suite requires the ML stack);tests/test_version_reporting.py(torch absent +spikeforgenot pip-installed in this venv).git stash+ re-run on the pre-change tree makestest_version_reporting.pyfail harder (collection ERROR, not 5 assertion failures) — the change is not the cause.Not verified
.venv/uv.lock). CI owns that.snn_interpreterwas not touched (provenance, hq#2, found no unique work to port).