Implement Phase 5 tensor graph and ensemble representations - #11
Conversation
There was a problem hiding this comment.
Sorry @EmergentMonk, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
Reviewer's GuideImplements the Phase 5 representation layer on top of the existing Phase 4 boundary, adding Rust runtime support, a new CLI, typed tensor/graph/ensemble structures, deterministic bundle identity, governance gates, and CI validation for the new contracts without promoting biological/clinical claims. Sequence diagram for deterministic Phase 5 bundle generationsequenceDiagram
participant CLI as igm-represent
participant Engine as Phase5Engine
participant Model as Phase4 validated profile
participant P3B as Phase3B engine
participant Gate as Phase5 representation gate
participant Bundle as JSON bundle
CLI->>Engine: load(model_path, config_path, repository_root)
Engine->>Model: load_profile(model_path)
Engine->>P3B: PentaCrtEngine::load(model_path, execution_profile_path)
CLI->>Engine: bundle()
Engine->>P3B: verify_penta_crt(penta, verification_samples)
P3B-->>Engine: accepted residual verification
Engine->>P3B: run_penta_crt(index, one-state slice)
P3B-->>Engine: pair-distance extrema
Engine->>Gate: make_gate(config, centered_tensor, assessment, vortex)
Gate-->>Engine: accepted non-promoting gate receipt
Engine->>Bundle: compute bundle_sha256
Bundle-->>CLI: deterministic representation bundle
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Phase 5 implementation is now green on the exact current head Implemented contracts include explicit non-tensor arrays, a transformation-declared centered coordinate tensor, typed model/hypergraph/provenance/tensor-factor/visualization namespaces, 120 pair-distance/contact observables, geometric accessibility, Phase-3B-gated explicit-index ensemble statistics, computational uncertainty ( The governance policy also now carries normative Current exact-head workflows are all green: documentation foundation, visual laboratory, Rust runtime, Phase 4 evidence adapters, and the dedicated Phase 5 representation suite. No unresolved review threads are present at this point. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 171195d1bb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Addressed all 7 Codex review findings on the current Phase 5 head Fixes include:
The tamper suite now also checks stale bundle identities, a recomputed-digest graph semantic promotion, and a recomputed-digest inconsistent observable. The first version of that regression targeted the visualization graph, which legitimately has zero edges under the current V0 cutoff, so it was corrected to tamper a populated model-graph edge instead. All five workflows are green on this exact head: Phase 5 representation checks, Rust runtime checks, Phase 4 evidence adapter checks, documentation foundation, and visual laboratory checks. All 7 Codex review threads are resolved. |
Summary
Implements Phase 5 as the representation/computational layer above the merged Phase 4 evidence boundary.
This PR does not create a V1 biological model, biological validation, molecular-dynamics realism, clinical validity, patient-specific meaning, or a performance claim.
Numerical arrays and true tensors
Adds explicit row-major numerical projections for Cartesian positions and pair-distance-squared values. These remain
tensor_claimed=false.Adds a separately typed centered Cartesian coordinate tensor only because its transformation semantics are declared: component-axis basis permutations, orthogonal Cartesian vector transformations, and translation removal by centroid subtraction.
Typed graphs and hypergraphs
Adds separately named model, model-hypergraph, provenance, tensor-factor, and visualization graph contracts while retaining the existing Phase 3C execution graph as its own namespace.
N-ary model constraints remain hyperedges and are not silently expanded into pairwise biological relationships.
Observables
Adds all 120 unique pair-distance observables for the 16-node V0 fixture, an explicit assumed computational-contact cutoff, and nearest-neighbour geometric accessibility under an explicit assumed clearance threshold.
Every contact/accessibility output remains a computational observable with biological/biochemical claims fixed false.
Ensemble statistics
Uses an explicit deterministic Phase 3B index set
[0, 11704, 23408]. Phase 5 first requires the existing fixed Phase 3B residual verification gate, then runs each listed conformation as a one-state slice and computes count/min/max/mean/median/population variance/population standard deviation for pair-distance extrema.The statistics describe only that explicit synthetic index set. No sampling-population or biological-ensemble inference is made.
Computational uncertainty
Adds explicit Phase 5 uncertainty types:
Distribution records are metadata-only in this phase and do not silently sample. Computational uncertainty cannot promote evidence strength.
Tensor-network assessment
Adds a fail-closed graph-structured tensor-network assessment. Admission requires both exact reconstruction and material reduction.
The current exact candidate
X = X * I3is deliberately not admitted because it stores more elements than the dense centered tensor. This is a negative result by design, preventing tensor-network sophistication from becoming cargo-cult optimization.Optional vortex-inspired projection
The reference config keeps vortex-inspired projection disabled. When explicitly enabled it emits only a representational radial-squared / Cartesian phase embedding and fixes biological ontology/scientific interpretation claims false.
Gate and CI
Adds
IGM-PHASE5-REPRESENTATION-GATE-V1, deterministic bundle SHA-256 identity, dedicated Phase 5 schemas/validator,igm-represent, and a Phase 5 workflow covering structural validation, Rust tests, deterministic output identity, graph separation, tensor-network rejection, and scientific non-promotion.Summary by Sourcery
Establish the Phase 5 computational representation layer above the Phase 4 evidence boundary with deterministic, schema-validated, and explicitly non-biological tensor, graph, observable, ensemble, and uncertainty outputs.
New Features:
igm-representCLI for schema-admitted representation bundle generation.Bug Fixes:
Enhancements:
Build:
igm-representbinary in Cargo.CI:
Documentation:
Tests:
Chores: