Skip to content
Draft
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: 8 additions & 6 deletions LOCUS64_EXECUTION_COHERENCE_RAIL.athens
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ATHENS_DEVELOPMENT_RAIL v1
field=key=current_stage;value=incremental-closure
field=key=next_stage;value=native-upper-projection
field=key=current_stage;value=native-upper-projection
field=key=next_stage;value=legacy-authority-quarantine
field=key=projection_authority;value=non_authoritative
field=key=rail_version;value=3
field=key=rail_version;value=4
field=key=schema_version;value=1
gate=id=incremental-closure-green
gate=id=legacy-authority-quarantine-green
Expand All @@ -19,17 +19,19 @@ stage_field=stage=proof-producing-congruence;key=status;value=complete
stage=id=incremental-closure
stage_field=stage=incremental-closure;key=depends_on;value=proof-producing-congruence
stage_field=stage=incremental-closure;key=required_gates;value=incremental-closure-green
stage_field=stage=incremental-closure;key=status;value=current
stage_field=stage=incremental-closure;key=status;value=complete
stage=id=native-upper-projection
stage_field=stage=native-upper-projection;key=depends_on;value=incremental-closure
stage_field=stage=native-upper-projection;key=required_gates;value=native-upper-projection-green
stage_field=stage=native-upper-projection;key=status;value=next
stage_field=stage=native-upper-projection;key=status;value=current
stage=id=legacy-authority-quarantine
stage_field=stage=legacy-authority-quarantine;key=depends_on;value=native-upper-projection
stage_field=stage=legacy-authority-quarantine;key=required_gates;value=legacy-authority-quarantine-green
stage_field=stage=legacy-authority-quarantine;key=status;value=planned
stage_field=stage=legacy-authority-quarantine;key=status;value=next
history=from_status=current;gates=native-constraint-core-green;mode=linear_advance;stage_id=native-constraint-core;to_status=complete
history=evidence=github-cbcbfe5d9c4f34baf0ca54306c77a85ac970bd26-run-29990484222;kind=dogfood_promotion_receipt;stage_id=native-constraint-core
history=from_status=current;gates=proof-producing-congruence-green;mode=linear_advance;stage_id=proof-producing-congruence;to_status=complete
history=evidence=github-0a84bdd3dc232a0db1b79009c3bf99cfd4fb40cd-run-29997066639;kind=dogfood_promotion_receipt;stage_id=proof-producing-congruence
history=from_status=current;gates=incremental-closure-green;mode=linear_advance;stage_id=incremental-closure;to_status=complete
history=evidence=github-fd90966af2191e6d9ca5e14e17f0bcaca431c260-run-30009891592;kind=dogfood_promotion_receipt;stage_id=incremental-closure
END
46 changes: 46 additions & 0 deletions LOCUS64_INCREMENTAL_CLOSURE_CHANGE_CHAIN.athens
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
ATHENS_DEVELOPMENT_RAIL v1
field=key=projection_authority;value=non_authoritative
field=key=rail_version;value=7
field=key=schema_version;value=1
gate=id=closure-state-evaluator-green
gate=id=context-refinement-impact-green
gate=id=exact-affected-recompute-green
gate=id=incremental-closure-green
gate=id=local-global-closure-green
gate=id=reverse-incidence-green
stage=id=reverse-incidence
stage_field=stage=reverse-incidence;key=required_gates;value=reverse-incidence-green
stage_field=stage=reverse-incidence;key=status;value=complete
stage=id=closure-state-evaluator
stage_field=stage=closure-state-evaluator;key=depends_on;value=reverse-incidence
stage_field=stage=closure-state-evaluator;key=required_gates;value=closure-state-evaluator-green
stage_field=stage=closure-state-evaluator;key=status;value=complete
stage=id=context-refinement-impact
stage_field=stage=context-refinement-impact;key=depends_on;value=closure-state-evaluator
stage_field=stage=context-refinement-impact;key=required_gates;value=context-refinement-impact-green
stage_field=stage=context-refinement-impact;key=status;value=complete
stage=id=exact-affected-recompute
stage_field=stage=exact-affected-recompute;key=depends_on;value=context-refinement-impact
stage_field=stage=exact-affected-recompute;key=required_gates;value=exact-affected-recompute-green
stage_field=stage=exact-affected-recompute;key=status;value=complete
stage=id=local-global-closure
stage_field=stage=local-global-closure;key=depends_on;value=exact-affected-recompute
stage_field=stage=local-global-closure;key=required_gates;value=local-global-closure-green
stage_field=stage=local-global-closure;key=status;value=complete
stage=id=incremental-closure-closure
stage_field=stage=incremental-closure-closure;key=depends_on;value=local-global-closure
stage_field=stage=incremental-closure-closure;key=required_gates;value=incremental-closure-green
stage_field=stage=incremental-closure-closure;key=status;value=complete
history=from_status=current;gates=reverse-incidence-green;mode=linear_advance;stage_id=reverse-incidence;to_status=complete
history=evidence=local%3A43-tests%2Breverse-index%2Bdecode-rebuild%2Bexact-independent-exclusion;kind=dogfood_promotion_receipt;stage_id=reverse-incidence
history=from_status=current;gates=closure-state-evaluator-green;mode=linear_advance;stage_id=closure-state-evaluator;to_status=complete
history=evidence=local%3Aclosure-closed-open-invalid%2Bevidence-propagation%2Bclippy;kind=dogfood_promotion_receipt;stage_id=closure-state-evaluator
history=from_status=current;gates=context-refinement-impact-green;mode=linear_advance;stage_id=context-refinement-impact;to_status=complete
history=evidence=local%3Adirect-child-constraint-refinement%2Bpositive-discharge%2Bnegative-refusal;kind=dogfood_promotion_receipt;stage_id=context-refinement-impact
history=from_status=current;gates=exact-affected-recompute-green;mode=linear_advance;stage_id=exact-affected-recompute;to_status=complete
history=evidence=local%3Areverse-reachable-only%2Bdownstream-equality%2Bindependent-stability;kind=dogfood_promotion_receipt;stage_id=exact-affected-recompute
history=from_status=current;gates=local-global-closure-green;mode=linear_advance;stage_id=local-global-closure;to_status=complete
history=evidence=local%3Aroot-open%2Bchild-closed-or-invalid%2Bglobal-aggregate;kind=dogfood_promotion_receipt;stage_id=local-global-closure
history=from_status=current;gates=incremental-closure-green;mode=linear_advance;stage_id=incremental-closure-closure;to_status=complete
history=evidence=github-fd90966af2191e6d9ca5e14e17f0bcaca431c260-run-30009891592;kind=dogfood_promotion_receipt;stage_id=incremental-closure-closure
END
16 changes: 15 additions & 1 deletion l64-native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ The sixth boundary adds the first native constraint core without creating a para

The larger implementation files are factored only at existing item boundaries into construction, typing, transaction, validation, codec, and RNA concerns. This changes review locality without introducing another authority layer or altering canonical bytes.



The seventh boundary adds proof-producing congruence without promoting a union-find table into authority:

- equality is a native type judgment with a deterministically attached equality witness;
Expand All @@ -55,4 +57,16 @@ State identity is the domain-separated BLAKE3 commitment of canonical native byt

The existing `l64-cli` command names now route `L64R1` and `L64D` directly through this native path. Legacy RNA/DNA behavior is classified as compatibility/forensic ingress and is available explicitly through `l64-cli legacy ...`; ambient fallback remains temporarily available with a mandatory deprecation warning.

This remains additive. It does not yet implement incremental dependency closure, native upper-stack projections, or replacement of the legacy runtime, registry, certification, and old packet implementation internally.
This remains additive. It does not yet implement native upper-stack projections or replacement of the legacy runtime, registry, certification, and old packet implementation internally.

The eighth boundary adds incremental closure without turning invalidation into a second authority database:

- reverse dependencies and context-local node lists are derived from canonical type/port incidence and rebuilt after decode;
- assumption change is represented by an immutable direct child-context refinement, preserving prior authority in its original scope;
- guarded operations, their judgments, evidence, downstream operations, and equality proofs receive context-relative `Closed`, `Open`, or `Invalid` closure states;
- closure transitions identify the exact reverse-reachable subgraph whose state changed and carry the constraint binding that caused the transition;
- independent structure remains outside the affected set;
- local and global closure are distinguishable;
- closure queries do not alter canonical bytes, commitments, routes, contexts, or journal history.

The derived reverse index is an in-memory accelerator only. It is excluded from RNA, DNA, state commitments, and authority identity.
63 changes: 63 additions & 0 deletions l64-native/src/closure.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
use crate::{ContextId, NodeId};

#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
pub enum ClosureState {
Closed,
Open,
Invalid,
}

impl ClosureState {
pub(crate) fn combine(self, other: Self) -> Self {
self.max(other)
}
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct ClosureTransition {
node: NodeId,
before: ClosureState,
after: ClosureState,
cause: NodeId,
from_context: ContextId,
to_context: ContextId,
}

impl ClosureTransition {
pub(crate) fn new(
node: NodeId,
before: ClosureState,
after: ClosureState,
cause: NodeId,
from_context: ContextId,
to_context: ContextId,
) -> Self {
Self {
node,
before,
after,
cause,
from_context,
to_context,
}
}

pub fn node(&self) -> NodeId {
self.node
}
pub fn before(&self) -> ClosureState {
self.before
}
pub fn after(&self) -> ClosureState {
self.after
}
pub fn cause(&self) -> NodeId {
self.cause
}
pub fn from_context(&self) -> ContextId {
self.from_context
}
pub fn to_context(&self) -> ContextId {
self.to_context
}
}
13 changes: 11 additions & 2 deletions l64-native/src/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use std::collections::BTreeMap;

use crate::kernel::{ConstraintState, EqualityRule, EvidencePlan};
use crate::{
ConstraintKind, ContextDelta, Dimension, JournalEvent, LocusWord, Obstruction, OpCode, Port,
PortRole, Route,
ClosureState, ClosureTransition, ConstraintKind, ContextDelta, Dimension, JournalEvent,
LocusWord, Obstruction, OpCode, Port, PortRole, Route,
};

pub type NodeId = u32;
Expand Down Expand Up @@ -67,6 +67,12 @@ impl Node {
}
}

#[derive(Debug, Clone, Default)]
struct DerivedIndex {
reverse: Vec<Vec<NodeId>>,
by_context: Vec<Vec<NodeId>>,
}

#[derive(Debug, Clone)]
pub struct Graph {
nodes: Vec<Node>,
Expand All @@ -75,6 +81,7 @@ pub struct Graph {
routes: BTreeMap<Route, NodeId>,
journal: Vec<JournalEvent>,
commitment: [u8; 32],
derived: DerivedIndex,
}

impl Default for Graph {
Expand All @@ -87,3 +94,5 @@ include!("graph/construction.rs");
include!("graph/typing.rs");
include!("graph/storage.rs");
include!("graph/context.rs");
include!("graph/derived.rs");
include!("graph/closure.rs");
Loading
Loading