Commit graph

73 commits

Author SHA1 Message Date
Shay
3affd29a82 Remove stale grc_logos_v1 pack files 2026-05-13 14:40:10 -07:00
Shay
594ca5503e Remove stale grc_logos_v1 pack files 2026-05-13 14:40:03 -07:00
Shay
c8c0f489ef Remove stale he_logos_v1 pack files 2026-05-13 14:39:46 -07:00
Shay
b28e8e064e Remove stale he_logos_v1 pack files 2026-05-13 14:39:37 -07:00
Shay
08794408d3 Remove stale he_logos_v1 and grc_logos_v1 packs (broken checksums, superseded by *_micro_* packs) 2026-05-13 14:39:21 -07:00
Shay
966b35efa3 Remove stale he_logos_v1 and grc_logos_v1 packs
These were the pre-rename originals superseded by he_logos_micro_v1 and
grc_logos_micro_v1. Their manifests have checksum mismatches (visible via
`python -m language_packs list`) because the lexicon content was updated
without re-checksumming before the rename.

No tests reference these pack IDs. No code loads them. Leaving broken
packs in data/ creates false noise in `list` output and risks a future
agent loading the wrong pack by prefix match.
2026-05-13 14:38:58 -07:00
Shay
4c447dea81 Add language_packs CLI: python -m language_packs compile/verify/list
Three subcommands:
  compile <pack_id>  — compile a pack, verify checksum, print manifold stats
  verify  <pack_id>  — checksum-only verification without full compilation
  list               — list all available packs with role and entry count

Checksum rule (AGENTS.md) is enforced by design: the CLI reads bytes from
disk via read_bytes() as the single source of truth, never from in-memory
strings. This makes the compiler an auditable D0 instrument — not just an
importable function.

Exit codes: 0 = success, 1 = checksum mismatch or pack not found.
2026-05-13 14:37:36 -07:00
Shay
d997b88d32 Tighten session node tracking and generation selection 2026-05-13 14:35:31 -07:00
Shay
4c3004c73a Improve chat runtime and probe REPL 2026-05-13 14:30:36 -07:00
Shay
f8113a38ba Restore FieldState slots in determinism proof 2026-05-13 14:26:24 -07:00
Shay
4e7c29b84a Fix field state introspection and pack manifold geometry 2026-05-13 14:24:29 -07:00
Shay
52de2218b7 Stabilize contracts: FieldState slots=True; fix README vocab layer; add checksum rule to AGENTS.md
Three items from the post-assessment stabilization slice:

1. field/state.py: restore frozen=True, slots=True
   slots=True closes __dict__ on FieldState instances, preventing
   incidental attribute injection that frozen=True alone does not block.
   The holonomy field works cleanly with slots because ndarray | None
   is a valid slotted field type in Python 3.12.

2. README.md: correct vocab/ layer description
   Was: 'Word-to-versor manifold, edge rotors'
   Now: 'Surface-token manifold points; indexed access for algebraic
         transition construction'
   Edge rotors are constructed by algebra/, not stored in vocab/.
   This exact confusion caused vocab.edge_rotor() drift in earlier work.

3. AGENTS.md: add language-pack checksum rule
   Manifest checksums MUST be computed by reading back the bytes
   written to disk (Path(f).read_bytes()), never from in-memory strings
   before serialization. Unicode-escaped JSON on disk != Python str.
2026-05-13 14:18:08 -07:00
Shay
e6bf8ade5e Fix he/grc micro pack manifest checksums to match actual on-disk bytes
Permanent lesson: checksums must be computed from bytes-on-disk after
git writes the file (unicode-escaped JSON lines), not from in-memory
Python strings before serialization. The compiler CLI must do:
  checksum = hashlib.sha256(Path(lexicon_path).read_bytes()).hexdigest()
after writing the file, not before.

he_logos_micro_v1: ea1ac85d...
grc_logos_micro_v1: 1fea9d9c...
2026-05-13 14:15:55 -07:00
Shay
c7e23c7a97 Fix triple-alignment test: unique first domains per Logos word; rename packs to micro
Root cause: all 7 Logos words shared 'logos.core' as first domain, making
them cluster into a single blob. The misaligned triple (word ↔ ראשית,
word ↔ πνεῦμα, דבר ↔ ἀρχή) scored 0.379 vs aligned 0.299 because
cross-language 'spirit' and 'beginning' were geometrically indistinguishable
from 'word' when logos.core dominated the rotor composition.

Fix: each Logos word now has a UNIQUE leaf domain as its FIRST (highest-
weight) domain that it shares ONLY with its cross-language counterparts:
  word/דבר/λόγος      → logos.utterance.word
  beginning/ראשית/ἀρχή → logos.genesis.origin
  light/אור/φῶς       → logos.illumination.photon
  life/חיים/ζωή       → logos.vitality.animate
  truth/אמת/ἀλήθεια   → logos.aletheia.verity
  spirit/רוח/πνεῦμα   → logos.pneuma.breath
  create/ברא/κτίζω    → logos.ktizo.formation

logos.core retained as second domain (background cohesion, lower weight).
divine.revelation removed from spirit/רוח/πνεῦμא (was polluting alignment).

Packs renamed: he_logos_v1 → he_logos_micro_v1, grc_logos_v1 → grc_logos_micro_v1
(test expects *_micro_* IDs).

All three manifests updated with correct D0 checksums.
2026-05-13 14:13:11 -07:00
Shay
1f5e0eb1a5 Fix en_minimal_v1 manifest checksum; fix probe/repl.py import path
- manifest checksum updated to match actual bytes-on-disk
  (eca36a3d... — line endings differ between Python serialization and git)
- probe/repl.py: add sys.path.insert so it resolves language_packs
  from repo root when run directly
2026-05-13 14:08:58 -07:00
Shay
93578f685b Enrich en_minimal_v1 domains; add he_logos_v1 and grc_logos_v1 micro-packs
- en_minimal_v1: all 60 entries enriched from 1-2 flat domain labels to
  3-5 layered domain strings encoding semantic proximity. Key shared
  strings: logos.core (all 9 Logos words), divine.revelation (light,
  truth, word, spirit, life), knowledge.ground (truth, know, reason,
  mean, answer), logos.genesis (beginning, create, begin, form),
  communication.articulation (word, say, speak, ask, answer, mean),
  logic.polarity (yes, no, not, cannot), agency.subject (pronouns).

- he_logos_v1: 7-entry Hebrew Logos micro-pack. Domain strings
  intentionally cross-aligned with English counterparts so nearest()
  across packs resolves to the same geometric neighborhood. Morphology
  tags carry root triliteral (root:דבר, triliteral:D-B-R, etc).

- grc_logos_v1: 7-entry Koine Greek Logos micro-pack. Same cross-
  alignment strategy. Morphology tags carry declension class, case,
  aspect, and root (root:λεγ, alpha_privative, etc).

Manifests created with SHA-256 checksums, D0 determinism class,
gate_engaged: true, oov_policy: fail_closed.
2026-05-13 14:06:11 -07:00
Shay
d07ca21690 Add ignore rules for generated artifacts 2026-05-13 14:00:49 -07:00
Shay
a87c7a9c6f Fix full test suite after cognitive runtime 2026-05-13 13:52:11 -07:00
Shay
71e99c5c51 Build first cognitive response path 2026-05-13 13:40:06 -07:00
Shay
b9cd6684f5 Assert session vault contains assistant final state 2026-05-13 13:17:47 -07:00
Shay
d781ba71db Avoid identity stalls in generation loop 2026-05-13 13:16:48 -07:00
Shay
defd7a9a53 Use true versor fixture in engine loop proof 2026-05-13 13:15:22 -07:00
Shay
99c0e31bbe fix(INV-02): replace normalize_to_versor with unitize_versor at construction sites
algebra/rotor.py and persona/motor.py were calling normalize_to_versor()
which is the gate-only injection primitive. Both are construction-time
sites (building rotors and motors from raw arrays), so the correct call
is unitize_versor().

Also tightens TestINV02 to scan for normalize_to_versor violations only —
unitize_versor has its own legitimate call sites and is not under the
same single-site restriction. Adds a new TestINV02b that verifies
unitize_versor is NOT called inside propagation, generation, or vault
recall paths.

Fixes: INV-02 architectural invariant test failure.
2026-05-13 13:14:59 -07:00
Shay
2e842341b3 Restore text projection default OOV policy 2026-05-13 13:14:41 -07:00
Shay
58092112c3 Document language pack manifold contract 2026-05-13 13:13:06 -07:00
Shay
dbdc606937 Add language pack roles and OOV policy 2026-05-13 13:12:35 -07:00
Shay
d186da7a7d Add language pack roles and OOV policy 2026-05-13 13:11:44 -07:00
Shay
c9052ef4b0 Add language pack schema foundation 2026-05-13 13:10:50 -07:00
Shay
48947db9d4 Add language pack schema foundation 2026-05-13 13:10:05 -07:00
Shay
0431bdf655 Align holonomy tests with indefinite metric 2026-05-13 12:59:32 -07:00
Shay
2303c68f6a Constrain closure fixture to positive unit reflectors 2026-05-13 12:59:15 -07:00
Shay
62501b6730 Use true versor fixtures in holonomy tests 2026-05-13 12:55:41 -07:00
Shay
bacf1f4084 Use true versor fixtures in closure tests 2026-05-13 12:55:20 -07:00
Shay
fca6216e3f Stabilize holonomy accumulation 2026-05-13 12:54:53 -07:00
Shay
ba45158f8e Fix CGA null embedding convention 2026-05-13 12:51:49 -07:00
Shay
4fe19c08ba Fix Python Cl41 blade product table 2026-05-13 12:51:26 -07:00
Shay
5b34b72158 Fix versor condition residual 2026-05-13 12:49:53 -07:00
Shay
3abae93e73 Fix FieldState identity assertion in engine proof 2026-05-13 12:39:34 -07:00
Shay
c4ee81f315 Add deterministic engine loop proof 2026-05-13 12:37:46 -07:00
Shay
1731ca6500 Add deterministic engine loop proof 2026-05-13 12:37:21 -07:00
Shay
3620c967b9 fix: route production hot paths through algebra.backend (Commit 2)
Three surgical import changes. No behavior change. No new semantics.
Backend decides Rust vs pure-Python transparently.

- field/propagate.py: versor_apply <- algebra.backend
- vocab/manifold.py: cga_inner    <- algebra.backend
- vault/store.py:    recall loop replaced with vault_recall() from
  algebra.backend; public result shape preserved ({versor, score,
  metadata, index}). null_project stays on algebra.cga (not the
  recall hot path). store() and reproject() unchanged.

Rust path for vault_recall uses Rayon parallel scan and releases
the GIL. Python fallback is sequential and behaviorally identical.
No batching introduced; that is Commit 3+.
2026-05-13 12:35:22 -07:00
Shay
3746f06898 fix: cohesive seam pass — frozen FieldState, GenerationResult, generation/vocab/algebra separation, normalization doctrine
- field/state.py: FieldState is now frozen+slotted; constructor copies and
  enforces float32 shape (32,); advance() updated to pass raw arrays.
  np.ndarray inside frozen dataclass is ref-frozen — copy() at construction
  is the explicit contract boundary.

- generate/result.py: NEW — GenerationResult frozen dataclass carrying
  tokens + final_state. Async variant yields tokens and exposes final_state
  on completion.

- generate/stream.py: generate() now returns GenerationResult, not list[str].
  vocab.edge_rotor() call replaced with:
    A = vocab.get_versor_at(current.node)
    B = vocab.get_versor_at(word_idx)
    V = word_transition_rotor(A, B)
  agenerate() updated to yield tokens and surface final_state.

- vocab/manifold.py: added get_versor_at(idx) and get_word_at(idx) indexed
  accessors. VocabManifold stores points; algebra constructs operators.
  normalize_to_versor() call-site in docstring clarified: callers must call
  unitize_versor() (algebra construction primitive) before add(), not
  normalize_to_versor() directly.

- algebra/versor.py: unitize_versor() added as the explicit construction-time
  primitive. normalize_to_versor() kept but marked internal/gate-only.
  Distinction encoded in docstrings and __all__.

- persona/motor.py + ingest/gate.py: SessionContext.respond() is not yet in
  the repo as a separate file; gate.py docstring updated to reflect the
  three-tier normalization doctrine:
    unitize_versor()    — algebra construction only
    inject()            — gate, once per raw input
    normalization       — forbidden in propagate/generate/vault recall
2026-05-13 12:32:36 -07:00
Shay
bb637ad3e1 feat(core_ingest): IngestPipeline, manifold integration, full test suite
- Add core_ingest/pipeline.py: IngestPipeline wires StructuralSegmenter →
  CandidateGeometricPressure construction → IngestCompiler → SegmentManifold
  in a single deterministic call. Accepts raw bytes + modality hint, returns
  (ValidationReport, list[LearningArtifact]) and auto-registers accepted
  packets into the manifold.

- Update core_ingest/compiler.py: compile() accepts an optional
  manifold: SegmentManifold | None = None parameter; when provided,
  accepted packets are registered automatically — callers no longer need
  a manual register() call.

- Update core_ingest/__init__.py: expose IngestPipeline, Segment,
  GateDisposition, ManifoldEntry in public __all__.

- Add tests/test_segmenter.py: prose, scripture, code, math segmenters;
  heading detection; empty-block filtering; D0 invariant on SourceSpan.

- Add tests/test_compiler.py: structural dedup by pressure_id; semantic
  convergence warning; ProvenanceGate / SemanticGate / GovernanceGate
  rejection paths; ReviewDecision override; acceptance_rate property.

- Add tests/test_manifold.py: register → lookup → spans_for round-trip;
  multi-key isolation; __len__ and __contains__; append-only semantics.

- Add tests/test_pipeline.py: end-to-end prose ingest; scripture ingest;
  manifold reconstruction lookup after pipeline run; empty-source guard."
2026-05-13 12:07:12 -07:00
Shay
4b98c492c4 tests: add test_determinism_proofs.py — machine-verified claims vs. transformer/attention architectures 2026-05-13 11:48:29 -07:00
Shay
7b3c15f51c feat: scaffold sensorium/ (ADR-0013) + tests/test_architectural_invariants.py + tests/test_sensorium_mount.py 2026-05-13 11:45:16 -07:00
Shay
7737f8ca66 feat: scaffold core_ingest/ governance layer (ADR-0012) 2026-05-13 11:35:00 -07:00
Shay
6010924405 docs: add ADR-0012, ADR-0013, ADR-0014, SESSION-2026-05-13 2026-05-13 11:24:10 -07:00
Shay
ac456ac3ad docs: update Whitepaper and Yellowpaper with ingest governance, sensorium layer, and pipeline diagram 2026-05-13 11:20:38 -07:00
Shay
b43cb79bcb docs: add ADRs 0012-0014, session log, update Whitepaper and Yellowpaper for ingest governance and sensorium layers 2026-05-13 11:16:03 -07:00
Shay
0fbc2e92a2 feat(generate): add render.py — default TextRenderer and Renderer protocol (ADR-0011) 2026-05-13 10:51:52 -07:00