feat: MNCS-native RAVEL core — five verified MNCS-language modules - #14
Conversation
…rvice integration Reconstructs RAVEL's reasoning core in the MNCS language (Source Profile 0.5) as one self-contained module per concern: - ravel.core: status dominance lattice over the full finite domain, evidence combination, gate-based disposition, advisory confidence; - ravel.loop: hypothesis/prediction/attribution with commit eligibility requiring clean gates AND confirmed prediction; negative retention; - ravel.checkpoint: immutable checkpoints, parent-bound candidates, structural commit/rollback isolation, orphan refusal; - ravel.memory: promotion lifecycle, transfer tests, counterexample immutability under later success, protected strategy selection; - ravel.task: task contexts bound to Language Service snapshot identities with typed refusals for stale/authority/budget drift. All modules execute through the language experiment flow on research bytecode with layered body/SSA/backend agreement PASS and expected values met (17+22+5+11+5 cases); overall statuses are honest (UNKNOWN where checked-arithmetic exact-cost obligations remain unresolved). Corpora carry nested record expectations; generators included. Adds Forge workflow 'mncs-experiments' (tools/ravel_mncs_check.py) verifying every module end to end against the sibling mncs-language checkout, plus architecture and evidence documentation including the backend capability matrix, legacy differential mapping table, and language-friction log. Development used mncs-language-service resident semantics throughout; its Phase 4 candidate analysis was driven by this conversion.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 838418748b
ℹ️ 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".
| } | ||
| ) | ||
| ) | ||
| return 0 |
There was a problem hiding this comment.
Return failure when the MNCS toolchain is unavailable
When the sibling checkout is absent or its CLI build fails, the registered mncs-experiments workflow prints BLOCKED but exits successfully; this was reproduced in the inspected environment. Any Forge or CI caller relying on the command's exit status therefore treats a run that executed none of the five experiments as successful, so this path should return a nonzero status.
Useful? React with 👍 / 👎.
| validations = [v.get("judgement") for v in document.get("translation_validations", [])] | ||
| status = document.get("status") | ||
| ok = met == total and all(v == "PASS" for v in validations) |
There was a problem hiding this comment.
Require at least one translation validation
If the CLI omits translation_validations—for example because an incompatible version stops producing the configured layered-agreement validator—validations is empty and all(...) evaluates to true. The workflow can consequently report PASS without the body/SSA/backend agreement that it claims to require; verify that the expected validator is present as well as that every returned judgement is PASS.
Useful? React with 👍 / 👎.
| if principle.id == strategy.principle_id { | ||
| if task_domain == strategy.scope_domain { | ||
| return TransferOutcome.TRANSFERS; |
There was a problem hiding this comment.
Keep transfers within the principle's declared scope
When a strategy references a promotable principle by ID but supplies a different scope_domain, a task in the strategy's scope is reported as TRANSFERS even though it is outside principle.scope_domain. Because the records are independently supplied, this allows a strategy to relabel a principle for another domain; transfer eligibility should also bind the strategy and task to the principle's declared scope.
Useful? React with 👍 / 👎.
| fn affordable(context: TaskContext, requested_steps: i64) -> (result: bool) { | ||
| return requested_steps <= context.budget_steps; |
There was a problem hiding this comment.
Reject negative evidence-request budgets
Because both fields are signed i64, any negative requested_steps satisfies this comparison against a normal nonnegative budget. plan_request() then emits ISSUE_REQUEST with a negative max_steps, allowing malformed requests past the stated budget boundary and potentially causing wrapping or rejection at an unsigned host boundary; affordability should require a nonnegative request as well.
Useful? React with 👍 / 👎.
| if primary_in_scope { | ||
| if primary_clean { | ||
| return Selection.PRIMARY_STRATEGY; |
There was a problem hiding this comment.
Honor ranks when selecting between clean strategies
When both strategies are clean and in scope, this immediate return always selects the primary even if fallback.rank is higher; in fact, neither rank field is read anywhere in select(). This makes the advertised ranking and the comment that equal ranks prefer primary ineffective for non-ties, so the clean in-scope candidates should be compared before selecting.
Useful? React with 👍 / 👎.
Summary
First full conversion cycle of RAVEL's reasoning core into the MNCS language itself, under
mncs/:mncs-experimentsverifying all modules against the sibling mncs-language checkout;Ecosystem changes driven by this conversion (merged upstream)
Non-claims
Bounded local development evidence only. No independent evaluation, promotion, conformance, or production claims. No executable differential harness against legacy RAVEL yet (mapped contracts documented instead).