Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,17 @@ jobs:
- run: python -m pip install --upgrade pip
- run: python -m pip install -e .
- run: python -m unittest discover -s tests -v

ravel-06-c:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- run: python -m pip install --upgrade pip
- run: python -m pip install -e .
- run: make -f ravel_versions/0.6/Makefile policy-test
- run: make -f ravel_versions/0.6/Makefile build behavioral-test transaction-test component-test decomposition-test negative-test compiler-matrix sanitizers
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RAVEL — the **Recursive Adaptive Vector Execution Lattice** — is an experime

RAVEL operates beneath the technical authority of the Machine-Native Complexity Standard (MNCS) and the Machine-Native Complexity Development Standard (MNCDS). It is not intended to replace a language model, compiler, static analyzer, test framework, or the MNCS Forge. Its role is to decide what evidence should be gathered, what action should follow, and what experience should be retained for later use without redefining the governing status of that evidence.

> **Project status:** RAVEL is research software. Historical RAVEL 0.4 and 0.5 results remain development `FAIL`; RAVEL 0.6 candidate-001 now has a reproducible build, an integrated development transaction path, behavioral fixtures, modular Python surfaces, and lifecycle scaffolding. It has not been frozen, selection-evaluated, independently evaluated, or promoted. Formal MNCS/MNCDS conformance, independent attestation, protected custody, production safety, and general recursive self-improvement remain `UNKNOWN`.
> **Project status:** RAVEL is research software. Historical RAVEL 0.4 and 0.5 results remain development `FAIL`; RAVEL 0.6 candidate-001 now has a digest-bound frozen-policy loader, matched-compute development observations, a behavior-preserving generated C component extraction, two real C providers, negative parity fixtures, and lifecycle/memory integration. It remains unfrozen and has not been selection-evaluated, independently evaluated, or promoted. Formal MNCS/MNCDS conformance, independent attestation, protected custody, production safety, and general recursive self-improvement remain `UNKNOWN`.

## Place in the MNCS ecosystem

Expand Down Expand Up @@ -104,6 +104,9 @@ The recommended extraction is history-preserving rather than a manual file copy.

The current 0.6 implementation status is recorded in
[`ravel_versions/0.6/RAVEL_0_6_IMPLEMENTATION_STATUS.md`](ravel_versions/0.6/RAVEL_0_6_IMPLEMENTATION_STATUS.md).
The frozen 0.6 policy is loaded by `src/ravel/policy.py` and generated into
candidate build constants; `src/ravel/matched_compute.py` evaluates the
development-only comparator without granting the candidate authority.
Optional provider/resource protocols in `src/ravel/providers.py` and
`src/ravel/resources.py` record scoped execution observations without claiming
algorithmic superiority. The bounded component surfaces in `src/ravel/world.py`,
Expand Down
13 changes: 9 additions & 4 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,17 @@ The repository now contains small, dependency-free foundations beneath the
- `ravel.lifecycle` records development candidate state transitions in an
append-only hash chain. `ravel.experience` turns scoped raw execution into
advisory episodic or negative memory without promoting status.
- `ravel.policy` validates frozen 0.6 policy inputs and derives a digest-bound
C policy header; `ravel.matched_compute` independently evaluates raw
development comparator counts.

The generated candidate-001 C source now has an explicit copy, hard-gate, raw
observation, and rollback surface around the existing adaptation primitive. The
historical monolithic C translation unit has not yet been physically extracted
into separate C translation units; the Python surfaces are the first tested
decomposition boundary, not a claim of completed R6-04 C decomposition.
observation, rollback, matched-compute, and provider surface around the
existing adaptation primitive. `tools/ravel_0_6_decompose.py` losslessly emits
ten provenance-bound component include units and a deterministic unity wrapper;
the wrapper preserves static linkage and byte-identical behavior to the
monolithic generated source. This is a physical source decomposition, not a
claim that independently compiled C ABI contracts or evaluator authority exist.

These modules are tested scaffolding and are not claims that RAVEL 0.6 has been
evaluated, selected, independently evaluated, certified, promoted, or made
Expand Down
7 changes: 7 additions & 0 deletions docs/EVIDENCE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ Wall-clock timing is host-specific and non-normative. Deterministic expert,
operation, or evaluation counts are the canonical work measures unless a
separate protocol explicitly defines cross-host performance evidence.

For RAVEL 0.6 development, `ravel.policy` binds the machine-readable
preregistration digest (and the explicitly inherited frozen 0.5 objective
constant) into the generated C threshold identity. The matched-compute record
contains raw candidate/comparator work counts and an integer ratio; the
candidate does not emit a formal compute PASS. The Python parser independently
reconstructs the ratio, and an absent comparator remains `UNKNOWN`.

## Distinct result questions

RAVEL reports several different questions that must not be collapsed:
Expand Down
7 changes: 7 additions & 0 deletions docs/PROJECT_MAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ regenerating the frozen records.
freeze/selection infrastructure; it has not consumed selection data.
- `src/ravel/experience.py` binds scoped execution outcomes to advisory memory,
retaining negative and `UNKNOWN` outcomes.
- `src/ravel/policy.py` is the fail-closed frozen 0.6 policy loader; generated
C constants carry its threshold identity.
- `src/ravel/matched_compute.py` validates raw development comparator counts and
ratios without producing formal authority.
- `tools/ravel_0_6_decompose.py` losslessly emits generated C component units
and a unity wrapper; `ravel_versions/0.6/ravel_0_6/README.md` documents the
current unity-build limitation.
- [`MIGRATION.md`](MIGRATION.md) records the standalone extraction provenance.

## Build and verification entry points
Expand Down
14 changes: 13 additions & 1 deletion ravel_versions/0.6/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CC ?= cc
CFLAGS ?= -std=c11 -O3 -Wall -Wextra -Werror -pedantic

.PHONY: build behavioral-test transaction-test component-test compiler-matrix sanitizers
.PHONY: build behavioral-test transaction-test component-test policy-test decomposition-test negative-test provider-test compiler-matrix sanitizers

build:
@set -e; out=$$(mktemp -d); python3 tools/ravel_0_6_build.py build --output-dir "$$out"; \
Expand All @@ -16,6 +16,18 @@ transaction-test:
component-test:
python3 -m unittest tests/test_components.py tests/test_lifecycle_experience.py

policy-test:
python3 -m unittest tests/test_policy.py tests/test_frozen_identities.py

decomposition-test:
python3 -m unittest tests/test_ravel_0_6_decomposition.py

negative-test:
python3 -m unittest tests/test_ravel_0_6_negative_matrix.py

provider-test:
RAVEL06_PROVIDER=branching python3 -m unittest tests/test_ravel_0_6_decomposition.py

compiler-matrix:
@set -eu; for compiler in gcc clang; do \
if command -v "$$compiler" >/dev/null 2>&1; then \
Expand Down
39 changes: 28 additions & 11 deletions ravel_versions/0.6/RAVEL_0_6_IMPLEMENTATION_STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ This is a development status record, not RAVEL 0.6 evaluation evidence.
frozen source, generator, generated source, compiler/version/argv, selected
environment-key identities, worktree status, stdout, stderr, and exit
status. Generated source is explicitly development-only.
- **Frozen policy source of truth:** `ravel.policy` validates the frozen 0.6
preregistration and the explicitly inherited frozen 0.5 objective constant,
derives transaction limits, and binds a deterministic threshold identity.
The 0.6 record declares no numeric absolute compute cap or representation
number; those remain explicit relative/`UNKNOWN` contract fields.
- **R6-02 integrated development transaction:** candidate-001 now wraps its
existing adaptation primitive in a copy-before-evaluate transaction. The
trial path records raw objective, retention, representation, prediction,
Expand All @@ -17,19 +22,28 @@ This is a development status record, not RAVEL 0.6 evaluation evidence.
vocabulary where the surfaces overlap, and rejected candidates restore the
previous checkpoint byte-for-byte. This is a development mechanism
disposition, not MNCS/MNCDS authority or a final evaluator.
- **R6-02 policy and matched-compute integration:** the C transaction uses the
digest-bound two-pass, exact-256 replay, separate retention-floor/loss, and
frozen ratio constants. Development trials emit raw candidate and
fixed-topology work counts with a reconstructible ratio; Python derives the
ratio independently without trusting the C disposition.
- **R6-03 behavioral fixtures:** a compiled harness reaches a goal only through
transition slot one and checks that a born child has only spawning-event
support. The candidate passes; frozen 0.5 and each reverted correction fail.
Outputs are integer facts plus stable checksums. A C transaction mutation
fixture also forces a retention gate failure and observes rollback.
- **R6-04 physical extraction and providers:** the generated source is
losslessly emitted as ten component units plus a deterministic unity wrapper.
The C mechanism has explicit branching and ring providers selected by a
recorded compile flag; provider identity and evidence change while core
source remains unchanged.
- **R6-04 bounded surfaces:** `world`, `transition`, `planning`,
`mechanism_state`, and `checkpoint` provide dependency-free, deterministic
interfaces with two independently defined toy providers. These surfaces
reproduce the tested slot-one/unknown-route behaviors and detect checkpoint
corruption. The generated C candidate now has an explicit transaction and
observation surface, but its historical monolithic translation unit has not
been physically split into multiple C translation units; R6-04 is therefore
partial rather than complete.
observation surface. The extraction is a reviewed unity-build boundary;
independently compiled C ABI contracts are not claimed.
- **R6-05 lifecycle infrastructure:** `ravel.lifecycle.CandidateLedger` is an
append-only, hash-chained, gap-resistant development ledger with the
preregistered candidate limit, freeze identities, partition separation,
Expand All @@ -39,18 +53,21 @@ This is a development status record, not RAVEL 0.6 evaluation evidence.
scoped execution outcomes into advisory episodic or negative memory records.
It preserves `UNKNOWN`, rejection reasons, resource observations, and
provenance rather than promoting remembered outcomes.
- **Execution-to-memory integration:** raw C development transaction records
convert into uniquely identified, scoped advisory memory. Accepted raw
executions remain `UNKNOWN` until governed disposition exists; rejected and
unavailable outcomes remain negative and deterministic retrieval includes
them.

## Not yet implemented or externally unavailable

- The C-side trial is connected to `ravel.c_observations` through the versioned
JSON record and shared reason vocabulary, with an accepted-path cross-check.
The parser/evaluator remains advisory and does not create formal evidence
status. The C trial has no matched-compute comparator yet, so that condition
is emitted as unavailable and remains `UNKNOWN`; a complete cross-language
negative matrix is still pending.
- The large generated C mechanism has not yet been physically split into
independent translation units. The Python component surfaces are scaffolding
and cross-provider fixtures, not a claim that C decomposition is complete.
JSON record and shared reason vocabulary, with accepted and negative-path
cross-checks. The parser/evaluator remains advisory and does not create
formal evidence status; missing external disposition remains `UNKNOWN`.
- Separately compiled C ABI contracts, full evaluator integration, and an
absolute compute budget remain incomplete or are not declared by the frozen
contract.
- R6-05 selection evaluation and promotion logic have not been consumed. The
ledger is infrastructure only; no candidate is frozen or selected by it.
- R6-06 external final custody/evaluation remains unavailable and `UNKNOWN`.
Expand Down
41 changes: 34 additions & 7 deletions ravel_versions/0.6/RAVEL_0_6_NEXT_STEPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,40 @@ unfrozen, and unevaluated for preregistered selection/final purposes.
Candidate-001 is now integrated as a reproducible temporary development build
by `tools/ravel_0_6_build.py`. Its trial path wraps the existing adaptation
primitive in an all-hard-gates copy/observe/commit transaction and emits raw
structured observations with stable rejection reasons. A compiled behavioral
harness verifies both corrections and fails against frozen 0.5 behavior and
bounded reverted mutations. Python component surfaces provide two independent
toy providers, deterministic planning, canonical checkpoints, and an
append-only development candidate ledger. These are implementation and local
development observations only; no selection or final material has been
consumed. See `RAVEL_0_6_IMPLEMENTATION_STATUS.md` for the exact boundary.
structured observations with stable rejection reasons. The frozen policy is
loaded once at generation time, and matched-compute work is emitted as a
separate raw development record. A compiled behavioral harness verifies both
corrections and fails against frozen 0.5 behavior and bounded reverted
mutations. Python component surfaces and the generated C unity extraction
provide two independent providers, deterministic planning, canonical
checkpoints, and an append-only development candidate ledger. These are
implementation and local development observations only; no selection or final
material has been consumed. See `RAVEL_0_6_IMPLEMENTATION_STATUS.md` for the
exact boundary.

### Queue disposition after the current iteration

- **R6-01:** provenance/build foundation complete; generated component and
policy identities are now included in temporary build records.
- **R6-02:** integrated for the local development transaction and matched raw
comparator; the frozen contract has no numeric absolute compute cap, so that
separate gate remains undeclared rather than invented.
- **R6-03:** behavioral and C/Python negative fixtures complete for declared
constraints; source-constant mutations are intentionally distinguished from
Python frozen-policy mutations and remain manifest-detectable.
- **R6-04:** physical source extraction and C provider substitution are
implemented as a behavior-preserving unity build. Independently compiled C
ABI contracts remain the next architectural step.
- **R6-05:** ledger infrastructure is hardened and exercised only with
development fixtures. Candidate-001 remains unfrozen because further
implementation changes are still expected.
- **R6-06:** external custody and evaluation remain unavailable/`UNKNOWN`.

The next logical implementation task is to promote one extracted C boundary at
a time to separately compiled units with explicit headers, retaining the unity
wrapper as a parity oracle. Do not freeze candidate-001 or consume selection
partitions until that work, policy parity, and the full development trial
matrix are stable.

## Codex next steps

Expand Down
18 changes: 18 additions & 0 deletions ravel_versions/0.6/ravel-0.6-matched-compute.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ravel.dev/schema/ravel-0.6-matched-compute/0.1",
"title": "RAVEL 0.6 development matched-compute observation",
"type": "object",
"additionalProperties": false,
"required": ["candidate_training_evaluations", "matched_training_evaluations", "ratio_q20", "maximum_ratio_q20", "reference_available", "threshold_identity", "comparator_identity", "partition_identity"],
"properties": {
"candidate_training_evaluations": {"type": "integer", "minimum": 0},
"matched_training_evaluations": {"type": "integer", "minimum": 0},
"ratio_q20": {"type": "integer", "minimum": 0},
"maximum_ratio_q20": {"type": "integer", "minimum": 0},
"reference_available": {"type": "boolean"},
"threshold_identity": {"type": "string", "minLength": 1},
"comparator_identity": {"type": "string", "minLength": 1},
"partition_identity": {"type": "string", "minLength": 1}
}
}
5 changes: 4 additions & 1 deletion ravel_versions/0.6/ravel-0.6-transaction.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@
"raw": {
"type": "object",
"additionalProperties": false,
"required": ["objective_before_q20", "objective_after_q20", "base_accuracy_before_q20", "base_accuracy_after_q20", "representation_before_q20", "representation_after_q20", "prediction_rmse_before_q20", "prediction_rmse_after_q20", "transition_support_losses", "expert_count", "births", "retirements", "replay_records", "update_passes", "compute_evaluations", "matched_compute_evaluations", "matched_compute_reference_available"],
"required": ["objective_before_q20", "objective_after_q20", "base_accuracy_before_q20", "base_accuracy_after_q20", "retention_accuracy_before_q20", "retention_accuracy_after_q20", "retention_accuracy_delta_q20", "representation_before_q20", "representation_after_q20", "prediction_rmse_before_q20", "prediction_rmse_after_q20", "transition_support_losses", "expert_count", "births", "retirements", "replay_records", "update_passes", "compute_evaluations", "matched_compute_evaluations", "matched_compute_reference_available"],
"properties": {
"objective_before_q20": {"type": "integer", "minimum": 0},
"objective_after_q20": {"type": "integer", "minimum": 0},
"base_accuracy_before_q20": {"type": "integer", "minimum": 0},
"base_accuracy_after_q20": {"type": "integer", "minimum": 0},
"retention_accuracy_before_q20": {"type": "integer", "minimum": 0},
"retention_accuracy_after_q20": {"type": "integer", "minimum": 0},
"retention_accuracy_delta_q20": {"type": "integer"},
"representation_before_q20": {"type": "integer", "minimum": 0},
"representation_after_q20": {"type": "integer", "minimum": 0},
"prediction_rmse_before_q20": {"type": "integer", "minimum": 0},
Expand Down
22 changes: 22 additions & 0 deletions ravel_versions/0.6/ravel_0_6/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# RAVEL 0.6 generated component boundary

The 0.6 development build derives candidate-001 from the frozen 0.5 source,
then losslessly splits the generated text into bounded include units:

- preamble and shared types;
- core mechanism state and learning;
- world/provider generation;
- transition compilation;
- planning;
- checkpoint codec;
- observations and adaptation transaction;
- reporting;
- trial driver.

The current extraction compiles these pieces through a deterministic unity
wrapper. This preserves the generated candidate's static linkage and behavior
while making every component byte-addressable in the build manifest. It is a
physical source decomposition, not a claim that independently compiled C ABI
contracts or evaluator authority already exist. Promoting a component to a
separately compiled unit requires a separately reviewed header contract and a
new parity fixture.
2 changes: 2 additions & 0 deletions src/ravel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
"c_observations",
"experience",
"lifecycle",
"matched_compute",
"memory",
"mechanism_state",
"planning",
"policy",
"providers",
"resources",
"transition",
Expand Down
Loading
Loading