Skip to content

feat(semantics): establish v1.1 candidate and evidence spine - #93

Draft
onlyxItachi wants to merge 4 commits into
mainfrom
feat/v1.1-semantic-evidence-spine
Draft

feat(semantics): establish v1.1 candidate and evidence spine#93
onlyxItachi wants to merge 4 commits into
mainfrom
feat/v1.1-semantic-evidence-spine

Conversation

@onlyxItachi

@onlyxItachi onlyxItachi commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Architecture verdict and scope

Refs #72 and #73; neither issue is complete. PR #92 is retained feasibility evidence, not the architecture to ship. It is closed without merge as superseded; its branch and unique raw evidence remain preserved.

A bounded semantic subset of #72 is required; a full compiler/IR is not required for this Core phase. Rust owns program/dependency/evidence/selection/acceptance meaning; native Core owns arithmetic. No new target/metric bridge is used to represent target-free evidence.

Head: 4d9a864640ae0c1174f536070209244c625f38aa.
Base: 497d2787aebc1c2a59512e98f4ce2c38150ffea5 (main).
Branch: feat/v1.1-semantic-evidence-spine.

This remains a draft for maintainer architecture review. No merge or release is authorized. The v1.0 stabilization branch is untouched; no version/package/ABI change, tag, release, backport or retarget occurred.

What Core implements

  • Canonical source, absolute-difference, softsign and ordered frozen centered-product programs, with independent logical/transitive-source/depth/node limits.
  • Genuine fp32, mixed and fp64 execution: typed source/label/graph/frozen-state storage, profile-native pointwise arithmetic, existing Core Pearson SIMD primitives and a narrow ordered graph reduction. The centered multiply primitive is shared with existing supervised execution.
  • Four distinct contextual evidence definitions: reference absolute Pearson, paired signed Pearson, uncentered graph edge-energy ratio, and optional/partial actual-label absolute Pearson. No implicit utility aggregate or invented labels.
  • Stable EvidenceSpec identity separated from immutable bound operands and records. Policies survive context/label rebinding; old records preserve their original operands/provenance.
  • Explicit maximize/minimize primary channel, inclusive per-channel constraints, missing/undefined handling, optional-constraint opt-in, profile-correct thresholds and deterministic identity ties.
  • Explicit discovery-round authority: sources + supplied accepted atoms + current-round declarations. Rejected/foreign/stale-round inputs fail closed; cache residency does not grant eligibility.
  • Bounded accepted-value union retention, atomic retention admission, explicit cache clearing, later-round composition and same/new-frame unlabeled inference. New context invalidates values, not program identity.
  • Candidate-level deterministic Rayon lowering, source payload sharing, worker-bounded label scratch and duplicate immutable-channel work reuse. Structural work/bytes/round ceilings are explicit; they are not total RSS or timing guarantees.

Adversarial corrections and actual migration

The initial slice's latest-batch-only cache failed a two-accepted-atom composition counterexample (four executed nodes rather than one new composite). The bounded union cache fixes it. The original context-minted channel identity and unrestricted registry mutation were replaced by specification/binding separation and round-scoped declarations, not additional adapters.

Numerical adversaries reproduced finite-input Pearson variance underflow and graph denominator overflow falsely appearing as measured zero. Semantic evidence now retains definedness from the same native moments and rejects nonfinite graph intermediates before division. Public supervised Pearson's historical zero behavior and arithmetic remain unchanged. Three focused regressions cover underflow, nonfinite Pearson, and graph overflow across the relevant profiles. Stale mixed-only scope and unchanged-artifact wording were corrected during independent review.

Supervised unary aggregation/shortlisting is owned by semantic::supervised::SupervisedStrengths. Higher-order shortlist policy and the four CPU significance consumers now use that owner; old legacy_higher_feature_order* helpers are deleted. CPython RNG consumption, stable NaN/tie behavior, typed lanes and Core/GPU producer-order distinctions are preserved. Their different existing significance reducers remain explicit.

Legacy continuous/family planners and descriptors remain specialized execution lowerings. This does not claim every legacy family now uses FeatureId/EvidenceTable. PR #92's fixed catalog, result bridge and anchor-as-target protocol are not imported as a competing production model.

Design, semantics, limits and executable commands: v1.1 semantic evidence spine.

Local validation

  • Rust 1.89.0 MSRV and 1.97.1 release toolchain: full workspace 436 passed / 3 existing ignores on each; workspace check, strict all-target Clippy and fmt passed.
  • New semantic tests cover three-profile heterogeneous multi-round discovery, accepted composition and new-row inference; one/four-worker bit equality; conflicting/missing/constant/undefined channels; threshold precision; native Pearson and independent graph oracles; stale contexts/roles/schemas/profiles; transitive arity; repeated bounded rounds; cache/authority/resource failures.
  • Installed CPython 3.14 Core wheel outside checkout: 405 passed / 12 hardware-dependent skips.
  • Exact main-to-final-head installed supervised snapshot: all three profiles × four metrics × two seeds, including ordered candidates, score bits, permutation p-values and bootstrap means/stds, matches the exact PR base, prior PR93 head and one/default worker runs byte-for-byte. Snapshot SHA-256: 80d280d6725bfd540197e0ab636096735102bd75c4552241fcc0942d9e93e051.
  • Repository policy, docs/skills/notebooks/public API coverage, V1 architecture, source-tree release composition and normative version/manifest checks passed. Installed NumPy/family-generation and eager/resident/compiled/update-target parity checks also passed.
  • Bounded release-mode ownership diagnostic and complete raw samples: all three profiles, 1/4/default-24 workers; accepted values produce 78 observed hits and reduce materialized nodes from 180 to 91 in this paired-view fixture. This is internal evaluation, not public product throughput, HPC saturation or a universal speed claim.
  • Independent exact-head AI Review Record: PASS, zero unresolved P0/P1/P2; independent targeted 12/12 tests. This is not merge authorization.

Hosted checks for the final head/merge commit bef8c3d750474864e8df1757b3778eeb0afc4003: V1 contracts PASS; native platforms PASS; Build and Validate Wheels PASS, including the dedicated CPython installed-wheel matrix and final full-artifact preflight. All 9 configured required checks are green; 56 checks passed overall. The sole remaining check, informational production Core, is still running and no result is claimed for it. Intermediate af97505... runs were canceled when review corrections invalidated that head. Older review/check records are historical only. Final head/base remain unchanged and there are zero review threads.

What remains unproved or out of scope

This completes the enumerated Core semantic vocabulary, not every future #73 learning objective. No claim of general feature utility, calibrated heterogeneous utility, universal speedup or GPU performance is made.

CUDA/ROCm/Metal semantic operands, lowering and physical validation remain follow-on work. General learned encoders/objectives, broader legacy-family semantic migration, full #72 frontend/compiler/JIT, serialization ABI, Python decorators, multi-device scheduling, RT promotion and Polars 2 are not implemented. No public Python evidence API is introduced by this internal Rust phase.

@onlyxItachi onlyxItachi left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review Record

  • Model: gpt-5.6-terra
  • Role: independent adversarial design/implementation reviewer (issue73_exact_review); record relayed by the implementing coordinator
  • Exact reviewed commit: 56eed9c1c9e51de953a5428592d83af6025ad78e
  • Base: 497d2787aebc1c2a59512e98f4ce2c38150ffea5
  • Verdict: PASS — no unresolved P0/P1/P2 finding; not merge approval

The independent reviewer inspected the runtime diff at 3264817c0f0aa8e97f148d6b26b749e4864881ba and the final documentation-only delta to this exact head. Context/identity ownership, bounded dependencies/workspace, explicit missing evidence, mixed arithmetic, deterministic Rayon collection, accepted-program reuse and the supervised compatibility extraction are coherent for the explicitly bounded internal slice.

Findings resolved before this record:

  1. Inference schema validation belongs at the orchestrator boundary, not only in the Core lowering. The session now rejects incompatible schemas before executor dispatch, with a non-executing fake-executor regression.
  2. Documentation previously overstated provenance equality checking. It now distinguishes retained trusted provenance from schema/domain/ordered-key/role alignment and exact graph/label frame binding.

P0: none. P1: none. P2: none.

Validation boundary: independent static review; the reviewer did not rerun tests. Implementer test evidence is recorded separately in the PR body. Hosted exact-head CI is still running and is not asserted green. The worktree was clean and diff checks passed at review.

No Python public API, C ABI, Cargo/version/payload/GPU-native source change is introduced. This does not establish complete #72/#73, new GPU evidence execution, general USL feature quality, release readiness or maintainer merge authorization. PR #93 remains draft.

@onlyxItachi onlyxItachi left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review Record

  • Model: gpt-5.6-terra (ultra)
  • Role: Independent adversarial semantic/implementation reviewer
  • Base: 497d2787aebc1c2a59512e98f4ce2c38150ffea5
  • Reviewed commit SHA: 4d9a864640ae0c1174f536070209244c625f38aa
  • Verdict: PASS — no unresolved P0/P1/P2; not merge approval
  • Findings: P0 none; P1 none; P2 none; no outstanding nonblocking finding.

The independent reviewer examined the full base-to-head diff and final numerical-availability correction, verified clean state/base ancestry/diff checks, and independently ran exact-head semantic_precision_availability (3), semantic_native_reuse (2), and semantic_rounds (7): 12/12 passed.

Review covered candidate/dependency identity, contextual heterogeneous evidence, policy separation, missingness/directions/thresholds/ties, accepted-feature multi-round authority and inference, cache/resource admission, typed Core numerical paths and deterministic placement, supervised policy migration and compatibility, and documentation/claim boundaries.

Resolved during review/adversarial validation: stale mixed-only governance references; semantic Pearson zero/underflow and graph nonfinite-intermediate availability; incorrect unchanged-distribution wording. Existing supervised arithmetic/zero behavior remains intact. No public Python API/C ABI, package-version change, or new accelerator semantic executor was found. The enumerated Core vocabulary is complete for this phase, not every future #73 objective or every legacy family planner.

Integrator validation on the same final source: full Rust 1.89.0 and 1.97.1 workspace suites 436 passed / 3 existing ignores each, fmt/check/strict all-target Clippy passed; installed Core Python 405 passed / 12 hardware-dependent skips; supervised cross-head and one/default-worker snapshots byte-identical; policy/docs/skills/notebooks/API/architecture/source-composition/version/manifest gates passed. These are separate from the reviewer's independently executed subset.

Hosted CI remains in progress at submission and is not asserted green. Any later head change invalidates this record; any base change invalidates the current merge-commit checks. PR #93 remains draft. No merge/release or v1.0 stabilization change is authorized by this review.

@onlyxItachi

Copy link
Copy Markdown
Owner Author

Exact-head bounded Core ownership diagnostic

Source: 4d9a864640ae0c1174f536070209244c625f38aa, clean worktree.
Release executable SHA-256: c7f8bb8708154d18b028edf6079dbbf83230de28e27a613d1493aea000762612.
Raw CSV SHA-256: e1d87b61262a730b1a48a7aebe28d84635a0639efa8fb1e910b064008a7a490f.
Command: cargo +1.97.1 build --release --locked -j2 -p gafime-cpu --example semantic_core_sanity, then /usr/bin/time -v target/release/examples/semantic_core_sanity.

Fresh preflight at 2026-09-06T21:32:13Z: Ryzen AI 9 HX 370, 12 cores/24 logical CPUs, affinity 0–23, AC online, battery full; Linux 7.0.0-27; rustc 1.97.1 / LLVM 22.1.6. About 10 GiB memory available, 373 GiB disk free. Two current vmstat samples showed 99% CPU idle and no swap-in/out; local builds/tests/reviewer tests had finished. Desktop/browser remained running; no laboratory isolation is claimed. No affinity/power/OS setting was changed.

This is a single short diagnostic of internal semantic evaluation, not public product throughput, a cross-head speedup, accelerator qualification, or a saturation campaign. The deterministic fixture has 8,192 rows, 12 sources, 78 derived candidates, reference/paired/graph evidence and a duplicate bound reference channel. It runs five cold/resident pairs per profile/worker policy, following an untimed correctness warm-up. Each timed result is checked against the same evidence before acceptance. Declaration and acceptance are excluded from evaluation timing. Worker policies are diagnostic 1/4 and normal default 24.

Observed for every sample:

  • cold: 180 materialized nodes, zero retained hits;
  • accepted-resident: 91 materialized nodes, 78 retained hits;
  • retained bytes: 2,555,904 (fp32/mixed), 5,111,808 (fp64).

The remaining 91 nodes are the paired-view bank plus the primary reference; this slice deliberately retains one exact primary-frame bank, not every view. The separate source-sharing test checks Arc identity/no derived allocation. Duplicate-channel tests observe one primitive call, not inferred cache counters. The two-atom composition regression observes only one new node after both atoms are accepted.

Median evaluation milliseconds (five samples; raw order below):

Profile 1 worker cold/resident 4 workers cold/resident Default 24 cold/resident
fp32 2.181 / 1.960 1.268 / 1.078 1.209 / 1.039
mixed 2.138 / 1.935 1.410 / 1.142 1.096 / 0.901
fp64 3.628 / 2.683 2.289 / 1.958 1.553 / 1.319

This small shape demonstrates actual reuse and candidate-parallel execution without an obvious forced-serial path; it does not establish optimal worker counts, HPC saturation or general speed. Maximum process RSS was 32,116 KiB; no major page faults or swaps. Session byte bounds concern specified numerical banks, not total RSS. Timings are not acceptance gates or public performance claims.

Complete raw CSV (90 samples, preserved order)
profile,workers,sample,mode,rows,candidates,evaluation_ns,materialized_nodes,retained_hits,retained_bytes
Fp32,1,0,cold,8192,78,3561729,180,0,2555904
Fp32,1,0,accepted-resident,8192,78,2978230,91,78,2555904
Fp32,1,1,cold,8192,78,2849721,180,0,2555904
Fp32,1,1,accepted-resident,8192,78,2058153,91,78,2555904
Fp32,1,2,cold,8192,78,2181413,180,0,2555904
Fp32,1,2,accepted-resident,8192,78,1851104,91,78,2555904
Fp32,1,3,cold,8192,78,2027203,180,0,2555904
Fp32,1,3,accepted-resident,8192,78,1848784,91,78,2555904
Fp32,1,4,cold,8192,78,2033504,180,0,2555904
Fp32,1,4,accepted-resident,8192,78,1960214,91,78,2555904
Fp32,4,0,cold,8192,78,1432806,180,0,2555904
Fp32,4,0,accepted-resident,8192,78,1167867,91,78,2555904
Fp32,4,1,cold,8192,78,1239015,180,0,2555904
Fp32,4,1,accepted-resident,8192,78,1100547,91,78,2555904
Fp32,4,2,cold,8192,78,1267696,180,0,2555904
Fp32,4,2,accepted-resident,8192,78,1043837,91,78,2555904
Fp32,4,3,cold,8192,78,1289626,180,0,2555904
Fp32,4,3,accepted-resident,8192,78,1078386,91,78,2555904
Fp32,4,4,cold,8192,78,1212606,180,0,2555904
Fp32,4,4,accepted-resident,8192,78,1014547,91,78,2555904
Fp32,24,0,cold,8192,78,1261366,180,0,2555904
Fp32,24,0,accepted-resident,8192,78,1135317,91,78,2555904
Fp32,24,1,cold,8192,78,1208996,180,0,2555904
Fp32,24,1,accepted-resident,8192,78,1059447,91,78,2555904
Fp32,24,2,cold,8192,78,1347036,180,0,2555904
Fp32,24,2,accepted-resident,8192,78,1038857,91,78,2555904
Fp32,24,3,cold,8192,78,1149476,180,0,2555904
Fp32,24,3,accepted-resident,8192,78,1035567,91,78,2555904
Fp32,24,4,cold,8192,78,1138027,180,0,2555904
Fp32,24,4,accepted-resident,8192,78,1022326,91,78,2555904
Mixed,1,0,cold,8192,78,2766311,180,0,2555904
Mixed,1,0,accepted-resident,8192,78,2151303,91,78,2555904
Mixed,1,1,cold,8192,78,2136453,180,0,2555904
Mixed,1,1,accepted-resident,8192,78,1946464,91,78,2555904
Mixed,1,2,cold,8192,78,2133784,180,0,2555904
Mixed,1,2,accepted-resident,8192,78,1929763,91,78,2555904
Mixed,1,3,cold,8192,78,2138484,180,0,2555904
Mixed,1,3,accepted-resident,8192,78,1934503,91,78,2555904
Mixed,1,4,cold,8192,78,2150643,180,0,2555904
Mixed,1,4,accepted-resident,8192,78,1924274,91,78,2555904
Mixed,4,0,cold,8192,78,1534335,180,0,2555904
Mixed,4,0,accepted-resident,8192,78,1211456,91,78,2555904
Mixed,4,1,cold,8192,78,1439155,180,0,2555904
Mixed,4,1,accepted-resident,8192,78,1301946,91,78,2555904
Mixed,4,2,cold,8192,78,1409556,180,0,2555904
Mixed,4,2,accepted-resident,8192,78,1142217,91,78,2555904
Mixed,4,3,cold,8192,78,1320565,180,0,2555904
Mixed,4,3,accepted-resident,8192,78,1122277,91,78,2555904
Mixed,4,4,cold,8192,78,1241336,180,0,2555904
Mixed,4,4,accepted-resident,8192,78,1094746,91,78,2555904
Mixed,24,0,cold,8192,78,1136946,180,0,2555904
Mixed,24,0,accepted-resident,8192,78,978457,91,78,2555904
Mixed,24,1,cold,8192,78,1095576,180,0,2555904
Mixed,24,1,accepted-resident,8192,78,946617,91,78,2555904
Mixed,24,2,cold,8192,78,1189136,180,0,2555904
Mixed,24,2,accepted-resident,8192,78,900887,91,78,2555904
Mixed,24,3,cold,8192,78,988737,180,0,2555904
Mixed,24,3,accepted-resident,8192,78,787838,91,78,2555904
Mixed,24,4,cold,8192,78,926517,180,0,2555904
Mixed,24,4,accepted-resident,8192,78,774447,91,78,2555904
Fp64,1,0,cold,8192,78,5722022,180,0,5111808
Fp64,1,0,accepted-resident,8192,78,4239077,91,78,5111808
Fp64,1,1,cold,8192,78,5011964,180,0,5111808
Fp64,1,1,accepted-resident,8192,78,2683031,91,78,5111808
Fp64,1,2,cold,8192,78,3628088,180,0,5111808
Fp64,1,2,accepted-resident,8192,78,3622738,91,78,5111808
Fp64,1,3,cold,8192,78,3415649,180,0,5111808
Fp64,1,3,accepted-resident,8192,78,2554852,91,78,5111808
Fp64,1,4,cold,8192,78,3366519,180,0,5111808
Fp64,1,4,accepted-resident,8192,78,2604872,91,78,5111808
Fp64,4,0,cold,8192,78,2429342,180,0,5111808
Fp64,4,0,accepted-resident,8192,78,2019294,91,78,5111808
Fp64,4,1,cold,8192,78,2262103,180,0,5111808
Fp64,4,1,accepted-resident,8192,78,1932124,91,78,5111808
Fp64,4,2,cold,8192,78,2314093,180,0,5111808
Fp64,4,2,accepted-resident,8192,78,1991833,91,78,5111808
Fp64,4,3,cold,8192,78,2289122,180,0,5111808
Fp64,4,3,accepted-resident,8192,78,1958174,91,78,5111808
Fp64,4,4,cold,8192,78,1880564,180,0,5111808
Fp64,4,4,accepted-resident,8192,78,1524225,91,78,5111808
Fp64,24,0,cold,8192,78,1557665,180,0,5111808
Fp64,24,0,accepted-resident,8192,78,1421905,91,78,5111808
Fp64,24,1,cold,8192,78,1520175,180,0,5111808
Fp64,24,1,accepted-resident,8192,78,1287906,91,78,5111808
Fp64,24,2,cold,8192,78,1605815,180,0,5111808
Fp64,24,2,accepted-resident,8192,78,1319326,91,78,5111808
Fp64,24,3,cold,8192,78,1532245,180,0,5111808
Fp64,24,3,accepted-resident,8192,78,1224607,91,78,5111808
Fp64,24,4,cold,8192,78,1552525,180,0,5111808
Fp64,24,4,accepted-resident,8192,78,1477535,91,78,5111808

@onlyxItachi

Copy link
Copy Markdown
Owner Author

Exact main-to-PR installed supervised regression

The final phase also compared the actual PR base directly, not only the preceding PR93 head:

  • Base source: 497d2787aebc1c2a59512e98f4ce2c38150ffea5 (isolated detached worktree, clean after build).
  • Candidate source: 4d9a864640ae0c1174f536070209244c625f38aa (clean feature worktree).
  • Base local Core test wheel SHA-256: e81ffaae67c9fb50f916e7ac02a8adc86d52a10e6fda380363bcfa59b405df10.
  • Candidate local Core test wheel SHA-256: 5c0c913be8e454df18dc9955f07225ea9c28a6059281536b3628320bbb8844a4.
  • Toolchain: rustc 1.97.1, maturin 1.14.1, CPython 3.14.3; same isolated dependency environment, no-dependency wheel installs, tests run outside either checkout.

The tracked deterministic snapshot exercised fp32/mixed/fp64, all four existing supervised metrics, two seeds, capped higher-order candidates, permutations and bootstrap. Both installations were run in separate default-worker and RAYON_NUM_THREADS=1 processes.

PASS: all four 24,160-byte JSON snapshots are byte-identical. Ordered candidate identities and hexadecimal score/p-value/bootstrap fields all match. Shared SHA-256: 80d280d6725bfd540197e0ab636096735102bd75c4552241fcc0942d9e93e051. The previous PR93-head snapshot also matches this value.

Candidate wheel was restored in the test environment afterward. This is bounded exact regression evidence, not proof over every possible numerical input and not a performance comparison. These are local test wheels, not frozen release artifacts; nothing was published, versioned, merged or changed in either branch.

@onlyxItachi

Copy link
Copy Markdown
Owner Author

Core-completion final validation state

Head: 4d9a864640ae0c1174f536070209244c625f38aa.
Unchanged base/main: 497d2787aebc1c2a59512e98f4ce2c38150ffea5.
GitHub synthetic merge: bef8c3d750474864e8df1757b3778eeb0afc4003; completed V1 checkout logs explicitly bind that head/base pair.

Configured required check Result
Shared release tag, version, and full-artifact preflight success
ARM Linux installed-wheel validation success
ARM Windows installed-wheel validation success
Metal macOS installed-wheel validation success
CUDA 13.3 native source and lifecycle fixtures success
Contract and top-level NumPy parity success
Core source Docker build and runtime smoke success
Metal shader, payload, and v1 API validation success
Release source and sdist composition success

All 9/9 required checks passed. V1 Contract Validation, Native Platform Validation and Build and Validate Wheels completed successfully. There are 56 successful checks overall. The remaining production-Core A/B+B/A check is informational and still running; no throughput result is asserted.

The independent exact-head review passes with no unresolved P0/P1/P2. Review threads: zero. Main and PR head are unchanged; worktree is clean.

The bounded Core architecture now covers the enumerated programs/evidence/policy/acceptance lifecycle in fp32/mixed/fp64, including heterogeneous multi-round composition and new-row unlabeled inference. Legacy supervised policy ownership was migrated where displaced; specialized family lowerings remain, and this does not claim all legacy families have moved to FeatureId/EvidenceTable.

PR92 was closed without merge, retaining its evidence branch. PR93 remains draft for maintainer architecture/merge decisions. No accelerator semantic execution, version/public Python API/C ABI change, merge, release, or RC2 involvement occurred. Issues #72/#73 remain open.

This is the Core-phase handoff, not authorization to begin accelerators or to merge.

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