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
7 changes: 5 additions & 2 deletions 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 development build and behavioral harness, but has not been evaluated, frozen, selected, 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 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`.

## Place in the MNCS ecosystem

Expand Down Expand Up @@ -106,7 +106,10 @@ 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).
Optional provider/resource protocols in `src/ravel/providers.py` and
`src/ravel/resources.py` record scoped execution observations without claiming
algorithmic superiority.
algorithmic superiority. The bounded component surfaces in `src/ravel/world.py`,
`src/ravel/transition.py`, `src/ravel/planning.py`, `src/ravel/checkpoint.py`,
and `src/ravel/mechanism_state.py` provide deterministic provider substitution
and checkpoint fixtures; they do not replace the historical 0.5 source.

## Non-goals

Expand Down
40 changes: 28 additions & 12 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,22 @@ The repository now contains small, dependency-free foundations beneath the
- `ravel.memory` retains versioned source identities, explicit scope contracts,
negative-aware full-text retrieval, append-only proposal lifecycle events,
atomic batches, and rebuildable relation projections.
- `ravel.world`, `ravel.transition`, and `ravel.planning` define replaceable
environment, deterministic transition-compilation, and bounded planning
surfaces. `ToyBranchingWorld` and `ToyRingWorld` are independent fixtures;
provider identity is carried into the compiled projection.
- `ravel.mechanism_state` and `ravel.checkpoint` keep mechanism state separate
from evaluation and provide canonical round-trip identities with corruption
detection.
- `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.

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.

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 Expand Up @@ -254,15 +270,15 @@ The architectural invariant is:

> **RAVEL may remember any accurately typed experience, but only MNCS/MNCDS-governed evidence can establish the status and permitted use of that experience.**

## Initial implementation order

1. Define versioned MNCS/MNCDS-governed evidence and experience schemas.
2. Build an append-only local experience store.
3. Add a small Forge adapter for a handful of micro-verifiers.
4. Implement deterministic evidence-gap and verifier-selection rules.
5. Add causal hypothesis and intervention records.
6. Add negative-memory retrieval.
7. Compare static and adaptive routing under equal budgets.
8. Add transfer gates before broad strategy reuse.
9. Add distributed scheduling only after local semantics are stable.
10. Consider learned routing models only after the rule-based baseline is measurable.
## Current implementation order

1. Physically extract the tested C transaction, provider, planner, checkpoint,
and observation surfaces without changing candidate behavior.
2. Extend the tested `ravel.c_observations` cross-language adapter with a full
C/Python negative-reason matrix without making either side authoritative.
3. Use the append-only candidate ledger for development-only candidate freezes;
do not consume selection partitions in this repository-local loop.
4. Connect accepted and rejected execution records to the append-only memory
store and benchmark negative/contradiction retrieval.
5. Use the inspected Forge CLI/provider boundary only through explicit,
dependency-injected adapters; unavailable capabilities remain `UNKNOWN`.
8 changes: 8 additions & 0 deletions docs/PROJECT_MAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ regenerating the frozen records.
- `src/ravel/adaptation.py` provides the tested retention-transaction boundary.
- `src/ravel/providers.py` and `src/ravel/resources.py` provide optional,
replaceable Forge/runtime protocols without heavy ML dependencies.
- `src/ravel/world.py`, `src/ravel/transition.py`, and `src/ravel/planning.py`
provide deterministic provider/compiler/planner surfaces with two toy worlds.
- `src/ravel/mechanism_state.py` and `src/ravel/checkpoint.py` define the
evaluator-free state and canonical checkpoint boundary.
- `src/ravel/lifecycle.py` provides development-only append-only candidate
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.
- [`MIGRATION.md`](MIGRATION.md) records the standalone extraction provenance.

## Build and verification entry points
Expand Down
8 changes: 8 additions & 0 deletions docs/PROVIDER_RUNTIME.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,11 @@ status, evidence quality, and verifier outcome before any strategy reuse.
Standalone RAVEL tests use fake providers and resource backends. Forge is not a
mandatory dependency for the core package, and lack of a GPU does not make the
normal test suite fail.

The local Forge checkout was inspected for this iteration. Its current CLI
exposes typed project, provider, verifier, candidate, and lifecycle operations;
the available provider listing reports the project micro-verifier provider and
the precedence `FAIL > UNKNOWN > PASS`. RAVEL does not invoke that checkout as
a mandatory test dependency. `src/ravel/providers.py` remains the narrow
dependency-injected adapter boundary, so a missing or malformed Forge result
remains `UNKNOWN` rather than being synthesized as `PASS`.
26 changes: 25 additions & 1 deletion ravel_versions/0.6/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,35 @@
CC ?= cc
CFLAGS ?= -std=c11 -O3 -Wall -Wextra -Werror -pedantic

.PHONY: build behavioral-test
.PHONY: build behavioral-test transaction-test component-test compiler-matrix sanitizers

build:
@set -e; out=$$(mktemp -d); python3 tools/ravel_0_6_build.py build --output-dir "$$out"; \
printf 'RAVEL 0.6 development build directory: %s\n' "$$out"

behavioral-test:
python3 tools/ravel_0_6_behavioral_fixtures.py

transaction-test:
python3 -m unittest tests/test_ravel_0_6_transaction.py

component-test:
python3 -m unittest tests/test_components.py tests/test_lifecycle_experience.py

compiler-matrix:
@set -eu; for compiler in gcc clang; do \
if command -v "$$compiler" >/dev/null 2>&1; then \
out=$$(mktemp -d); CC="$$compiler" python3 tools/ravel_0_6_build.py build --output-dir "$$out" >/dev/null; \
"$$out/ravel_0_6_candidate_001" --self-test >/dev/null; \
find "$$out" -type f -delete; rmdir "$$out"; \
printf '%s: PASS\n' "$$compiler"; \
else printf '%s: UNAVAILABLE\n' "$$compiler"; fi; \
done

sanitizers:
@set -eu; if command -v clang >/dev/null 2>&1; then \
out=$$(mktemp -d); python3 tools/ravel_0_6_seed_candidate.py --output "$$out/candidate.c" >/dev/null; \
clang -std=c11 -O1 -g -Wall -Wextra -Werror -pedantic -fsanitize=address,undefined "$$out/candidate.c" -lm -o "$$out/candidate"; \
ASAN_OPTIONS=detect_leaks=0 "$$out/candidate" --self-test >/dev/null; \
find "$$out" -type f -delete; rmdir "$$out"; printf 'clang ASAN/UBSAN: PASS\n'; \
else printf 'clang ASAN/UBSAN: UNAVAILABLE\n'; fi
54 changes: 39 additions & 15 deletions ravel_versions/0.6/RAVEL_0_6_IMPLEMENTATION_STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,50 @@ 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.
- **R6-02 transaction foundation:** the Python adaptation surface evaluates
independent hard constraints over a copied checkpoint and restores the
preceding bytes on any rejection. Rejection codes cover objective epsilon,
retention floors, prediction degradation, transition support, topology,
replay, update, and compute budgets. This surface is tested with one
negative fixture per constraint; the generated C candidate has not yet
consumed this generic interface as a final evaluator.
- **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,
transition-support, topology, replay, pass, and compute observations, then
commits only when every hard gate passes. Rejection reasons use the Python
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-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 a stable checksum.
Outputs are integer facts plus stable checksums. A C transaction mutation
fixture also forces a retention gate failure and observes rollback.
- **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.
- **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,
rejection retention, and a guard preventing selection feedback from entering
the same candidate. No selection partition has been consumed.
- **Execution experience:** `ravel.experience.ExperienceRecord` converts raw,
scoped execution outcomes into advisory episodic or negative memory records.
It preserves `UNKNOWN`, rejection reasons, resource observations, and
provenance rather than promoting remembered outcomes.

## Not yet implemented
## Not yet implemented or externally unavailable

- R6-02 is not a completed 0.6 trial/evaluator pipeline. No development,
selection, or final material evaluation has been executed.
- R6-04 has not been claimed: the large generated C mechanism has not yet been
split into independent mechanism, provider, planning, checkpoint, and
observation units.
- R6-05 candidate ledgers and selection partition consumption are not present.
- 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.
- 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`.

The 0.6 candidate remains unfrozen, unselected, unpromoted, and unauthorized
Expand Down
21 changes: 12 additions & 9 deletions ravel_versions/0.6/RAVEL_0_6_NEXT_STEPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,22 @@ identity and requires every transformation to match exactly once. Tests verify
source identity, transformation semantics, deterministic output, read-only
checking, and strict C11 compilation.

These corrections produce development source only. Candidate 001 has not been
integrated into the 0.6 evidence pipeline, selected, frozen, or evaluated.
These corrections produce development source only. Candidate 001 is now
integrated into a local development trial path, but remains unselected,
unfrozen, and unevaluated for preregistered selection/final purposes.

## Current bounded implementation status

Candidate-001 is now integrated as a reproducible temporary development build
by `tools/ravel_0_6_build.py`. A compiled behavioral harness verifies both
corrections and fails against frozen 0.5 behavior and bounded reverted
mutations. A separate Python transaction foundation tests all declared hard
constraint classes with byte-identical rollback. These are implementation and
mutation observations only; the C candidate is not yet a complete 0.6 trial
evaluator, and no selection or final material has been consumed. See
`RAVEL_0_6_IMPLEMENTATION_STATUS.md` for the exact boundary.
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.

## Codex next steps

Expand Down
4 changes: 3 additions & 1 deletion ravel_versions/0.6/ravel-0.6-limitations.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# RAVEL 0.6 preregistration limitations

- No RAVEL 0.6 candidate has been implemented, frozen, selected, or evaluated.
- Candidate-001 has a reproducible development implementation and a local
development trial path, but it has not been frozen, selection-evaluated,
independently evaluated, or promoted.
- Development and selection seeds are repository-visible operator-controlled
material, not protected evidence.
- Future final seed material does not yet exist in this checkout.
Expand Down
39 changes: 39 additions & 0 deletions ravel_versions/0.6/ravel-0.6-transaction.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ravel.dev/schema/ravel-0.6-transaction/0.1",
"title": "RAVEL 0.6 development adaptation transaction",
"type": "object",
"additionalProperties": false,
"required": ["committed", "threshold_identity", "rejection_reason", "failed_constraint_mask", "rollback_byte_identical", "raw"],
"properties": {
"committed": {"type": "boolean"},
"threshold_identity": {"type": "string", "minLength": 1},
"rejection_reason": {"type": "string"},
"failed_constraint_mask": {"type": "integer", "minimum": 0},
"rollback_byte_identical": {"type": "boolean"},
"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"],
"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},
"representation_before_q20": {"type": "integer", "minimum": 0},
"representation_after_q20": {"type": "integer", "minimum": 0},
"prediction_rmse_before_q20": {"type": "integer", "minimum": 0},
"prediction_rmse_after_q20": {"type": "integer", "minimum": 0},
"transition_support_losses": {"type": "integer", "minimum": 0},
"expert_count": {"type": "integer", "minimum": 0},
"births": {"type": "integer", "minimum": 0},
"retirements": {"type": "integer", "minimum": 0},
"replay_records": {"type": "integer", "minimum": 0},
"update_passes": {"type": "integer", "minimum": 0},
"compute_evaluations": {"type": "integer", "minimum": 0},
"matched_compute_evaluations": {"type": "integer", "minimum": 0},
"matched_compute_reference_available": {"type": "boolean"}
}
}
}
}
15 changes: 14 additions & 1 deletion src/ravel/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
"""RAVEL executable research components."""

__all__ = ["memory"]
__all__ = [
"adaptation",
"checkpoint",
"c_observations",
"experience",
"lifecycle",
"memory",
"mechanism_state",
"planning",
"providers",
"resources",
"transition",
"world",
]
Loading
Loading