Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
84dfc80
fix: bind graph source claims to generation receipts
realmarcin Sep 15, 2026
e278671
feat: export versioned semantic text for shared fleet maps
realmarcin Sep 15, 2026
e59c6a3
feat: add verified BGE map and source-bound graph generation
realmarcin Sep 15, 2026
090b1bb
chore: pin governed embedding runtime to CLAW dbac7dd
realmarcin Sep 15, 2026
79e47ab
data: rebuild trait graph maps with verified source receipts
realmarcin Sep 15, 2026
7d310b9
Publish complete current text and graph maps for 593 traits
realmarcin Sep 15, 2026
c210bee
Retain released governance pin during additive fleet rollout
realmarcin Sep 15, 2026
ae689e2
Document installed text-map runtime and explicit cached refresh
realmarcin Sep 15, 2026
b8fe424
Reject trait graph publication against changed YAML inputs
realmarcin Sep 15, 2026
2a7832e
fix: refresh both graph layouts before local site rendering (#929)
realmarcin Sep 15, 2026
2364077
Merge commit '91441a298a757fe276caab644c7120a7657a9bb5' into fix/embe…
realmarcin Sep 15, 2026
fc7a464
Reconcile verified text-map runtime with canonical path checks
realmarcin Sep 15, 2026
e4807b2
Merge commit 'd227d23913ff3d99e2a369e79a2194e80601d71e' into fix/embe…
realmarcin Sep 15, 2026
3b32d6a
Merge commit '7b33697048ccad04b50a052696e29d4993c7332e' into fix/embe…
realmarcin Sep 15, 2026
0c856d9
Merge commit '86021eebbba77b990a8668c53a01ab25f978937b' into fix/embe…
realmarcin Sep 15, 2026
e61ce12
Merge commit '170463d6f1b5e3faa0e1d3b4e3bf7b3c64389dce' into fix/embe…
realmarcin Sep 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
- "research/**"
# As above: the corpus round-trip test reads data/traits/ (#554).
- "data/traits/**"
# Current graph publication reads the complete retained generation (#927).
- "data/embeddings/**"
workflow_dispatch:

permissions:
Expand Down
47 changes: 47 additions & 0 deletions conf/embedding-runtime/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Optional text-map runtime

This governed Python 3.13 environment is for explicit local embedding and
PaCMAP builds. Normal tests, record validation and Pages rendering do not
install it. The lock pins numerical/model dependencies independently of a
Mech's curation environment; the encoder and map receipts record actual
installed library versions as well.

From a Mech repository root, export current semantic input with its domain
adapter, inspect it, and then explicitly run inference and projection:

```bash
uv run python scripts/text_map_inputs.py --output workspace/text-map-inputs.jsonl
uv run python scripts/embedding_pipeline.py inspect --input workspace/text-map-inputs.jsonl
uv run --locked --project conf/embedding-runtime python scripts/embedding_pipeline.py embed --input workspace/text-map-inputs.jsonl --cache workspace/text-map-vectors.sqlite --profile-output workspace/text-map-profile.json --device cpu
uv run --locked --project conf/embedding-runtime python scripts/embedding_pipeline.py project --input workspace/text-map-inputs.jsonl --cache workspace/text-map-vectors.sqlite --profile workspace/text-map-profile.json --output data/text_map
uv run python scripts/embedding_pipeline.py check --output data/text_map --input workspace/text-map-inputs.jsonl --cache workspace/text-map-vectors.sqlite
```

Run one small explicit `--limit` adapter canary first, with separate output and
cache paths. Verify its vector count, finite coordinates, source receipt,
rendered page and repeat-run cache reuse before a full build. A canary is not a
complete-corpus artifact and cannot satisfy an enabled site's full-input check.

The default display limit is 50,000 records selected deterministically. All
input records must have a verified cache entry; the map reports omitted display
records. No all-pairs similarity matrix is allocated.

Model weights are downloaded only by the explicit `embed` command. A cached
model can be used with `HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1`. There are no
provider API calls. Old unpinned vector caches are not assigned this profile.

The existing site renderer stages a validated bundle at `text-map/` only after
the repository enables it in `conf/text_map.yaml`. Its normal Python environment
runs this verification without importing Torch, NumPy or PaCMAP. The build must
fail if an enabled map is absent, stale or invalid. Preflight checks the exact
BGE model/revision, 1024 dimensions and the fleet's 512-token window. The staging
call passes the approved generation name through `expected_bundle`, rejecting
a different pointer or altered generation before changing site files.
Site deployment remains the
publication boundary. A machine interruption during directory staging may
leave `.text-map-recovery-*` beside the destination; preserve it for recovery.

The runtime has been exercised on macOS Apple Silicon. Platform-specific model
wheels may constrain where heavy builds run; the standard-library verifier is
independent of those wheels. Cross-platform reproducibility is not implied by
the lock or a fixed random seed.
17 changes: 17 additions & 0 deletions conf/embedding-runtime/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[project]
name = "mech-embedding-runtime"
version = "1.0.0"
requires-python = ">=3.13,<3.14"
dependencies = [
"sentence-transformers==6.0.0",
"transformers==5.17.0",
"torch==2.14.0",
"pacmap==0.9.1",
"numpy==2.3.5",
"numba==0.63.1",
"scikit-learn==1.8.0",
"PyYAML==6.0.3",
]

[tool.uv]
package = false
915 changes: 915 additions & 0 deletions conf/embedding-runtime/uv.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions conf/text_map.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Shared BGE/PaCMAP map, checked against all current trait YAML.
enabled: true
Binary file modified data/embeddings/deepwalk_traits.tsv.gz
Binary file not shown.
140 changes: 137 additions & 3 deletions data/embeddings/metpo_to_kgm_node.tsv

Large diffs are not rendered by default.

Loading
Loading