mirror of
https://github.com/allaunthefox/SilverSight.git
synced 2026-07-30 17:16:16 +00:00
- Move canonical FixedPoint to Core/SilverSight/FixedPoint.lean - Add SilverSightRRC library: RRC logogram gates, receipt bridge, AVM ISA - Add AVMIsa.Emit as the sole top-level JSON output boundary - Add rrc-emit-fixture executable and Python I/O shims - Update AGENTS.md, glossary, project map, and build baseline Build: 2981 jobs, 0 errors (lake build)
4.4 KiB
4.4 KiB
RRC Refactor Status
Date: 2026-06-21 Goal: Port the Research-Stack RRC (Receipt Routing Classifier) decision surface into SilverSight.
Status
Bare-minimum refactor is complete and building.
- ✅ RRC logogram projection and admission gates
- ✅ Receipt core with SilverSight.Core receipt bridge
- ✅ RRC alignment gate (
determineAlignment) + 6 canonical fixture rows - ✅ AVM ISA (
Types,Value,Instr,State,Step,Run) - ✅ AVM canary bundle + top-level JSON emitter (
AVMIsa.Emit) - ✅ AVM-stamped RRC fixture corpus emitter (
emitFixtureCorpus) - ✅ Python raw-feature shims (
pist_matrix_builder.py,validate_rrc_predictions.py) - ✅ Executable
rrc-emit-fixtureto extract the JSON bundle - ✅ Glossary entries for all new domain terms
Location
The RRC layer lives under formal/SilverSight/ (Lake module namespace SilverSight.*).
User-facing symlinks are in formal/RRCLib/.
| File | Module | Role |
|---|---|---|
formal/SilverSight/RRCLogogramProjection.lean |
SilverSight.RRCLogogramProjection |
RRCShape, WitnessStatus, projection/merge gates |
formal/SilverSight/ReceiptCore.lean |
SilverSight.ReceiptCore |
ReceiptKind, Receipt, ledger, core bridge |
formal/SilverSight/RRC/Emit.lean |
SilverSight.RRC.Emit |
Alignment gate, FixtureRow, JSON emitter |
formal/SilverSight/AVMIsa/Types.lean |
SilverSight.AVMIsa |
AvmTy closed-world type universe |
formal/SilverSight/AVMIsa/Value.lean |
SilverSight.AVMIsa |
AvmVal typed values |
formal/SilverSight/AVMIsa/Instr.lean |
SilverSight.AVMIsa |
Instr / Prim opcodes |
formal/SilverSight/AVMIsa/State.lean |
SilverSight.AVMIsa |
AVM execution state |
formal/SilverSight/AVMIsa/Step.lean |
SilverSight.AVMIsa |
step transition function |
formal/SilverSight/AVMIsa/Run.lean |
SilverSight.AVMIsa |
Fuel-bounded run |
formal/SilverSight/AVMIsa/Emit.lean |
SilverSight.AVMIsa.Emit |
Top-level JSON output boundary |
Key architectural decisions
-
Canonical fixed point moved to Core.
Core/SilverSight/FixedPoint.leandefinesSilverSight.FixedPoint.Q16_16/Q0_16.formal/CoreFormalism/FixedPoint.leanis now a compatibility shim.- This lets
SilverSightRRCimport onlyCore/+ Mathlib, preserving the library method.
-
Two receipt types with a bridge.
Core/SilverSightCore.leankeeps the externalReceiptboundary.formal/SilverSight/ReceiptCore.leanadds the internal validation receipt model and atoSilverSightReceiptbridge.
-
Core AVM stays conceptual; concrete ISA lives in RRC.
Core/SilverSightCore.leandefines the abstractδ,Instruction,AVMStatecontract.formal/SilverSight/AVMIsa/implements the closed-world typed ISA.
Build commands
# All libraries
lake build
# Individual libraries
lake build SilverSightCore
lake build SilverSightFormal
lake build SilverSightRRC
# Emit and validate the fixture corpus JSON
lake build rrc-emit-fixture
.lake/build/bin/rrc-emit-fixture > /tmp/rrc_fixture_emitted.json
python3 python/validate_rrc_predictions.py /tmp/rrc_fixture_emitted.json
Verification results
| Gate | Result |
|---|---|
lake build |
✅ 2981 jobs, 0 errors |
lake build SilverSightCore |
✅ 3132 jobs, 0 errors |
lake build SilverSightFormal |
✅ 3132 jobs, 0 errors |
lake build SilverSightRRC |
✅ 2992 jobs, 0 errors |
lake build rrc-emit-fixture |
✅ green |
python3 -m py_compile python/pist_matrix_builder.py python/validate_rrc_predictions.py tests/test_q16_canonical.py .github/scripts/check_doc_sync.py .github/scripts/glossary_lint.py |
✅ green |
python3 .github/scripts/glossary_lint.py |
✅ no warnings |
python3 .github/scripts/check_doc_sync.py |
✅ OK |
rrc-emit-fixture | validate_rrc_predictions.py |
✅ OK: 6 rows |
pytest tests/test_q16_canonical.py |
⚠️ not run — pytest not installed in this environment |
Out of scope (future work)
- Full 250-equation
Corpus250(requiresPIST.Classify,PIST.Matrices250, source JSON). RRC.ReceiptDensity,RRC.PolyFactorIdentity,RRC.EntropyCandidates.python/build_corpus250.pygenerator for the full corpus.- PIST classifier surface to populate
pistProxyLabel/pistExactLabelfrom real matrices.
References
- Research-Stack sources:
0-Core-Formalism/lean/Semantics/Semantics/{RRC,AVMIsa,RRCLogogramProjection,ReceiptCore}.lean - SilverSight project map:
docs/PROJECT_MAP.md