Skip to content

chess-spectral v1.19.0 — srmech profile pattern (Task #211, ADR-0001 §7 Step 1)#408

Merged
lemonforest merged 2 commits into
mainfrom
task-211-chess-spectral-v1.19.0
May 14, 2026
Merged

chess-spectral v1.19.0 — srmech profile pattern (Task #211, ADR-0001 §7 Step 1)#408
lemonforest merged 2 commits into
mainfrom
task-211-chess-spectral-v1.19.0

Conversation

@lemonforest

Copy link
Copy Markdown
Owner

Summary

ADR-0001 §7 Step 1 — chess-spectral simple-profile POC, the first downstream consumer of the srmech v0.3.x profile pattern. Validates ADR-0001's simple tier against a real research package.

This is the rc/production rc cycle for chess-spectral v1.19.0. Per your TestPyPI-config note, the publish workflow is now updated to match srmech and ephemerides-spectral.

What ships

Profile-pattern integration

chess-spectral is now discoverable as the `"chess"` srmech profile:

```python
import srmech
chess = srmech.profile("chess")
enc = chess.encode_2d(chess.fen_to_pos(fen))
```

Eight bridge surfaces declared:

  • `encode_2d`, `encode_4d` (canonical 640-dim / 45 056-dim encoders)
  • `fen_to_pos` (FEN parser)
  • `channel_energies` (per-channel L² introspection)
  • `encode_2d_pure_phase` (integer-arithmetic encoder)
  • `phase_only_pseudo_legal_moves` (ALU-native move enumeration)
  • `encode_2d_bip_hybrid` / `decode_2d_bip_hybrid` (sign × magnitude compression)

Same 8 functions also register as `srmech.amsc.tool_schema` entries (owner=`chess`).

Tier: Simple profile. chess-spectral's own ctypes binding to its C library stays internal (`_native_pure_phase_2d.py`, `_native_bitboard4d.py`); srmech only exposes the Python bridge surfaces. This is the canonical simple-tier pattern from ADR-0001 §5.

chess-spectral-publish.yml — TestPyPI auto-routing

Matches the pattern srmech and ephemerides-spectral use:

Tag Route
`chess-spectral-vX.Y.ZrcN` TestPyPI (auto)
`chess-spectral-vX.Y.Z` PyPI (auto)
`workflow_dispatch` w/ target Manual override

Also added:

  • Description-match guard between `pyproject.toml` ↔ `pyproject-pure.toml` (mirrors srmech's rc8 lesson).
  • PyPI Summary 512-char limit guard with 480-char soft warning.

Thanks for setting up the TestPyPI config on test.pypi.org for chess-spectral!

End-to-end verification

Built chess-spectral 1.19.0 wheel locally + clean-venv test against production-PyPI srmech 0.3.1:

```
srmech: 0.3.1 | chess-spectral: 1.19.0

Profile: chess 1.19.0
chess tools registered: 8
encode_2d shape: (640,)
channel_energies: 10 channels
```

Why srmech>=0.3.1 (not 0.3.0)

The chess-POC migration is what surfaced both v0.3.1 fixes (Form-1 entry-point support + `[profile.tool_schema]` extension loading). v0.3.0 would silently enumerate the chess profile as `status='invalid'`. v0.3.1 makes it work end-to-end. Hence the floor.

After merge

Per the autonomous-rc-cycle discipline:

  1. You merge with `gh pr merge --merge` (no squash).
  2. I'll tag `chess-spectral-v1.19.0rc1` → publish workflow auto-routes to TestPyPI.
  3. Verify clean-venv install from TestPyPI works end-to-end against PyPI srmech 0.3.1.
  4. If green → open the v1.19.0 production PR for your review.

Test plan

  • CI matrix on this PR passes (`chess-spectral-ci`)
  • Review the changes — 7 files: 3 new profile artifacts + 2 pyproject bumps + workflow + CHANGELOG
  • You merge with `--merge` (not squash)
  • I manually tag `chess-spectral-v1.19.0rc1` → TestPyPI publish
  • Clean-venv install from TestPyPI; verify `srmech.profile("chess")` works
  • On green: open `chess-spectral-v1.19.0` production PR for your review

What's NOT in this PR

\U0001F916 Generated with Claude Code

lemonforest and others added 2 commits May 14, 2026 01:04
ADR-0001 §7 Step 1 (validates srmech's simple-profile tier against
the smallest spectral-research-portfolio consumer).

What ships
----------
chess-spectral is now discoverable via srmech.profile("chess").
Eight bridge surfaces declared (encode_2d, encode_4d, fen_to_pos,
channel_energies, encode_2d_pure_phase, phase_only_pseudo_legal_moves,
encode_2d_bip_hybrid, decode_2d_bip_hybrid). Same eight functions
register as srmech.amsc.tool_schema entries with owner="chess" so
LLM agents can discover them.

The chess-spectral direct-import path (from chess_spectral import …)
is unchanged. Profile path is purely additive.

Tier
----
Simple profile — chess-spectral keeps its own ctypes binding to its
C library internally (via _native_pure_phase_2d.py and
_native_bitboard4d.py). srmech only exposes the Python bridge
surfaces declared in the descriptor; the native binary belongs to
chess-spectral. This is the canonical "simple-tier" pattern from
ADR-0001 §5.

New files (under chess_spectral/)
---------------------------------
  srmech_profile.toml          — Profile descriptor (ADR-0001 §3 v1.0)
  _srmech_smoke.py             — Activation-time smoke test
  _srmech_tool_schema.toml     — 8-tool extension file for LLM agents

Modified
--------
  python/pyproject.toml         — version 1.18.0 → 1.19.0
                                — deps += srmech>=0.3.1,<0.4
                                — [project.entry-points."srmech.profiles"]
  python/pyproject-pure.toml    — version match + same deps + entry-point
                                — force-include for the two new TOMLs
  python/CHANGELOG.md           — [1.19.0] entry
  .github/workflows/
    chess-spectral-publish.yml  — rc-suffix → TestPyPI auto-route
                                  (matches srmech-publish.yml + ephemerides
                                  pattern); description-match guard;
                                  512-char Summary limit guard

Dependency floor: srmech>=0.3.1 (not >=0.3.0)
---------------------------------------------
v0.3.1's loader added Form-1 (package-only) entry-point support and
[profile.tool_schema] extension loading — both surfaced during THIS
POC. v0.3.0 would enumerate the chess profile as invalid; v0.3.1
makes it work end-to-end.

Workflow change — TestPyPI auto-routing
----------------------------------------
Pattern mirrors srmech-publish.yml and ephemerides-spectral-publish.yml:

  Tag chess-spectral-vX.Y.ZrcN → TestPyPI auto-route
  Tag chess-spectral-vX.Y.Z     → PyPI       auto-route

The tag-version regex now allows the rcN suffix. The publish job's
environment + URL switch on the rc-suffix presence. workflow_dispatch
target input remains as a manual override (no-rc fallback path).

Also added:
  * Description-match guard between pyproject.toml ↔ pyproject-pure.toml
    (mirrors srmech rc8 lesson)
  * PyPI Summary 512-char hard limit guard with 480-char soft warning

End-to-end verification (Windows / Python 3.14, clean venv)
-----------------------------------------------------------
With srmech 0.3.1 from production PyPI + chess-spectral 1.19.0 from
local wheel build:

  srmech: 0.3.1 | chess-spectral: 1.19.0
  Profile: chess 1.19.0
  chess tools registered: 8
  encode_2d shape: (640,)
  channel_energies: 10 channels

ADR-0001 §7 Step 1 closed. Step 2 (ephemerides-spectral plugin-
profile POC) is the next phase.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CI's test_immolation_readme_announces_current_version ratchet
requires a "## What's new in vX.Y" section in README.md matching
the current pyproject.toml version. v1.19.0 was missing it.

Section covers:
  * srmech profile pattern integration (the load-bearing change)
  * Simple-tier framing
  * The 8 bridge surfaces declared
  * srmech>=0.3.1 dep floor + the rationale
  * TestPyPI auto-routing workflow change

Matches the style of the v1.18 / v1.17 sections above it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lemonforest
lemonforest merged commit 0489f0f into main May 14, 2026
10 checks passed
@lemonforest
lemonforest deleted the task-211-chess-spectral-v1.19.0 branch May 14, 2026 06:54
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