interplane.Get Omega
Read in your language

aien-sovereign-core-mv

AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.

Brought by drakestapleton

GitHub aien-dev/aien-sovereign-core-mv#425 (code only)

closed derived 6c9d5c2b07c04d17 #425

Imported from GitHub aien-dev/aien-sovereign-core-mv#425 (code only)

GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).

Base 8c0921779c648bf4c70436b1f5549ec617f6d315 · Head 27c2fd1bc0e9f9be2c235eb91ae107b38aad5159

Apply it

git checkout -b patch-6c9d5c2b07c04d17 8c0921779c648bf4c70436b1f5549ec617f6d315
curl -fsSL https://interplane.io/drakestapleton/aien-sovereign-core-mv/patches/6c9d5c2b07c04d17.patch | git am

Raw patch (mbox) · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/aien-sovereign-core-mv
425
27c2fd1bc0e9f9be2c235eb91ae107b38aad5159
{"kind":"github-import","owner":"aien-dev","repo":"aien-sovereign-core-mv","number":425,"url":"https://github.com/aien-dev/aien-sovereign-core-mv/pull/425","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:37:08Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/.crumb b/.crumb
index 45de4c00..411b78dd 100644
--- a/.crumb
+++ b/.crumb
@@ -77,14 +77,14 @@
         }
       ],
       "children_root": "sha256:0c69c37ec527d2183340aa639635588d47acef703c467df22a0c42b2c22d4740",
-      "compiled_at": "2026-10-11T05:01:16Z",
+      "compiled_at": "2026-10-11T05:27:42Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:c74ef6c1eea2fbe001b24f653717d3e567b2420ddc8bbf02bbf80b37bb701452",
+      "digest": "sha256:b1ec1ec007377d5ee3f51a5646b034ff97f2898a778a5e7719b62196b2c1a666",
       "evidence_files": 187,
       "evidence_root": "sha256:27ee0353cb4d4aae2b7dbce2bfe0d9f4ef2a94cd7a4555b84684d59372503280",
-      "files": 3193,
-      "generated_at_commit": "aa3ad59f93c8d4c9649d23a2348fc097bf2e07d2",
-      "source_tree": "sha256:319b77cc03ac6eadab506fe359aa1f15c039e72faf61e59da0a4e97998783546"
+      "files": 3194,
+      "generated_at_commit": "ea6feabae1b0bf78462b08b343b773b9e56d055e",
+      "source_tree": "sha256:bd7e7958ec533b17633799280788af5279b9c955d815d490ec213c77780a40cf"
     }
   },
   "history": [],
diff --git a/crates/aien-runtime/src/destination.rs b/crates/aien-runtime/src/destination.rs
index 660882e9..b62415b9 100644
--- a/crates/aien-runtime/src/destination.rs
+++ b/crates/aien-runtime/src/destination.rs
@@ -291,11 +291,29 @@ impl std::fmt::Display for DestinationError {
     }
 }
 
+/// A path with its leading `./` segments removed, and nothing else changed
+/// (sc#402): `./report.md` and `report.md` name the same workspace file, so a
+/// path that enters from text (a goal word, a reply's `filename:` line) is
+/// read in its bare form. Inner `./` segments, `..`, absolute paths, `~`,
+/// empty results and every other form are left exactly as written, so the
+/// strict checks that follow (`spine::check_relative_path`,
+/// `effects::confine_shape`) refuse them as before. The one shared reading.
+pub fn strip_leading_curdir(path: &str) -> &str {
+    let mut p = path;
+    while let Some(rest) = p.strip_prefix("./") {
+        p = rest;
+    }
+    p
+}
+
 fn clean(w: &str) -> &str {
     const Q: fn(char) -> bool = |c| matches!(c, '"' | '\'' | '`' | '(' | ')' | '[' | ']');
-    w.trim_matches(Q)
-        .trim_end_matches(['.', ',', ';', ':', '!', '?'])
-        .trim_matches(Q)
+    // sc#402: a leading `./` is dropped once quotes and punctuation are gone.
+    strip_leading_curdir(
+        w.trim_matches(Q)
+            .trim_end_matches(['.', ',', ';', ':', '!', '?'])
+            .trim_matches(Q),
+    )
 }
 
 fn has_extension(w: &str) -> bool {
@@ -892,3 +910,32 @@ mod tests {
         assert_eq!(d("Edit ~/secret.txt"), Ok(Some("~/secret.txt".into())));
     }
 }
+
+/// sc#402: a goal that writes `./report.md` names `report.md`; unsafe forms
+/// keep their old reading (and are refused downstream as before).
+#[cfg(test)]
+mod dotslash_tests {
+    use super::*;
+
+    #[test]
+    fn strip_leading_curdir_removes_only_leading_dot_slash() {
+        assert_eq!(strip_leading_curdir("./report.md"), "report.md");
+        assert_eq!(strip_leading_curdir("././a/b.md"), "a/b.md");
+        assert_eq!(strip_leading_curdir("a/./b"), "a/./b");
+        assert_eq!(strip_leading_curdir("./../x"), "../x");
+        assert_eq!(strip_leading_curdir(".//x"), "/x");
+        assert_eq!(strip_leading_curdir("./"), "");
+        assert_eq!(strip_leading_curdir("."), ".");
+        assert_eq!(strip_leading_curdir(""), "");
+        assert_eq!(strip_leading_curdir("../x"), "../x");
+        assert_eq!(strip_leading_curdir(".hidden"), ".hidden");
+    }
+
+    #[test]
+    fn a_goal_naming_dot_slash_names_the_bare_path() {
+        let d = |g: &str| named_destination(g, &|_| false);
+        assert_eq!(d("Edit ./report.md"), Ok(Some("report.md".into())));
+        assert_eq!(d("Write ././docs/a.md"), Ok(Some("docs/a.md".into())));
+        assert_eq!(d("Edit ./../x.md"), Ok(Some("../x.md".into())));
+    }
+}
diff --git a/crates/aien-runtime/src/spine.rs b/crates/aien-runtime/src/spine.rs
index 4bbfc376..5f8bb245 100644
--- a/crates/aien-runtime/src/spine.rs
+++ b/crates/aien-runtime/src/spine.rs
@@ -810,7 +810,8 @@ fn outer_fence_close(body: &[&str], open_len: usize) -> Option<usize> {
 
 /// The model's answer in the fixed proposal template: the first nonempty
 /// line is `filename: <relative path>` (case-insensitive key; quotes,
-/// backticks and asterisks around it or the path are ignored), everything
+/// backticks and asterisks around it or the path are ignored, and so are leading
+/// `./` segments of the path, sc#402), everything
 /// after it is the complete content (blank lines around it and one
 /// surrounding code fence are dropped; it ends with one newline).
 /// Err names why the reply is refused. Deterministic: the Skill, the AEGIS
@@ -826,7 +827,8 @@ pub fn check_file_proposal(text: &str) -> Result<FileProposal, String> {
     if first.len() < KEY.len() || !first[..KEY.len()].eq_ignore_ascii_case(KEY) {
         return Err("no filename line: the first line must be 'filename: <relative path>'".into());
     }
-    let path = bare(&first[KEY.len()..]).to_string();
+    // sc#402: `./report.md` is `report.md`; the strict check then runs as before.
+    let path = crate::destination::strip_leading_curdir(bare(&first[KEY.len()..])).to_string();
     check_relative_path(&path)?;
     let mut body: Vec<&str> = lines[at + 1..].to_vec();
     while body.first().is_some_and(|l| l.trim().is_empty()) {
@@ -3452,3 +3454,51 @@ mod append_placement_tests {
         assert!(!at_end("The appended line"));
     }
 }
+
+/// sc#402 (RUN-3-GB10 E4): a leading `./` names the same workspace file as
+/// the bare relative path; every other unsafe or non-plain form stays refused.
+#[cfg(test)]
+mod dotslash_tests {
+    use super::*;
+
+    fn path_of(name: &str) -> Result<String, String> {
+        check_file_proposal(&format!("filename: {name}\n# Report\nbody\n")).map(|p| p.path)
+    }
+
+    #[test]
+    fn leading_dot_slash_names_the_bare_path() {
+        assert_eq!(path_of("./report.md"), Ok("report.md".into()));
+        assert_eq!(path_of("././a/b.md"), Ok("a/b.md".into()));
+        assert_eq!(path_of("`./report.md`"), Ok("report.md".into()));
+        assert_eq!(path_of("report.md"), Ok("report.md".into()));
+    }
+
+    #[test]
+    fn every_other_form_is_refused_as_before() {
+        for bad in [
+            "../x", "./../x", "/x", "a/../b", "a/./b", ".", "./", "~/x", ".//x", "a//b", "a\\b",
+        ] {
+            assert!(path_of(bad).is_err(), "{bad:?} must stay refused");
+        }
+        assert!(check_file_proposal("filename: \n# R\nbody\n").is_err());
+        assert!(
+            check_relative_path("./report.md").is_err(),
+            "the strict check stays strict"
+        );
+    }
+
+    #[test]
+    fn an_edit_reply_naming_dot_slash_merges_into_the_named_file() {
+        let prior = "# Report\n\nOne.\n";
+        let out = edit_proposal_placed(
+            "filename: ./report.md\n# Report\n\nOne.\nThe topic is harbours.\n",
+            Some(("report.md", prior)),
+            EditPlacement::for_goal("Append one line to report.md naming the topic."),
+        )
+        .unwrap();
+        assert_eq!(
+            out,
+            "filename: report.md\n# Report\n\nOne.\nThe topic is harbours.\n"
+        );
+    }
+}
diff --git a/docs/campaigns/whole-system-e2e/REGRESSION-sc402-dotslash.md b/docs/campaigns/whole-system-e2e/REGRESSION-sc402-dotslash.md
new file mode 100644
index 00000000..3a559b69
--- /dev/null
+++ b/docs/campaigns/whole-system-e2e/REGRESSION-sc402-dotslash.md
@@ -0,0 +1,60 @@
+# Regression evidence, sc#402 (a leading `./` names the same workspace file), Lane A2, 2026-10-11
+
+Pre-registered before the code change. Results are filled in below the plan after the checks; the plan is not edited.
+
+## The failing scenario (RUN-3-GB10-20261011T045450Z, row E4)
+
+After `remember` succeeded, the daemon was killed (SIGKILL) and restarted, and the second objective asked the model to
+edit `report.md`. Attempts 2 and 3 answered `filename: ./report.md` and were refused by the daemon's proposal reader:
+`path "./report.md" is not a plain relative path` (`RESULT-RUN-3-GB10.md`, E4 and CTRL-E4b rows). `./report.md` and
+`report.md` name the same file in the workspace, so this is a product defect, not a safety refusal.
+
+## The rule (coordinator ruling, 2026-10-11)
+
+One shared function, `destination::strip_leading_curdir`, removes leading `./` segments, and nothing else, where a path
+enters the daemon from text:
+
+1. the model's proposal (`spine::check_file_proposal`, the `filename:` line, which every reader of a reply uses: the
+   skill, the AEGIS contract, the authorization and the write), and
+2. the words of a goal (`destination` word cleaning, which feeds the named destination and named inputs that
+   `classify_named` and the input collector then check).
+
+The existing strict checks then run unchanged on the stripped path: `spine::check_relative_path` (no absolute path,
+no `~`, no `..`, no empty or `.` segment, letters, digits and `._-/` only, at most 255 bytes) and, for grants,
+`effects::confine_shape`. So absolute paths, any `..` segment (also `./../x`), empty segments, `~`, backslashes, NUL
+and anything that escapes the workspace stay refused exactly as before.
+
+Decisions recorded with the rule:
+
+- Inner `./` segments are NOT normalised: `a/./b` stays refused by the spine. `.` and `./` (empty after stripping) stay
+  refused. `.//x` strips to `/x`, which is absolute and stays refused.
+- The grant and effect layer (`effects::confine_shape`, `confine_target`, `open_confined`) is left strict: it is a
+  backstop that accepts only the one canonical spelling, so an authorization record never holds two spellings of one
+  file. Its existing test that refuses a grant for `./N.md` stays as it is. Grants are built from the proposal's path,
+  which is now already canonical, so the backstop is never reached with `./` from a model reply.
+
+## Plan
+
+| check | how | expected |
+|---|---|---|
+| new tests red on main | the new unit tests in `spine.rs` and `destination.rs`, built against main 8c09217 with the test commit only | `./report.md` proposal refused (test fails) |
+| new tests green | `cargo test -p aien-runtime -p aien-cli` (linked compose archive) | all pass, including: `./report.md` -> `report.md`; `././a/b.md` -> `a/b.md`; refused: `../x`, `./../x`, `/x`, `a/../b`, `a/./b`, `.`, `./`, empty, `~/x`, `.//x`; an edit reply naming `./report.md` merges into `report.md`; a goal naming `./report.md` names `report.md` |
+| grant backstop unchanged | existing `grants_are_confined_and_the_approved_kind_is_reserved` | passes unchanged (`./N.md` grant refused) |
+| lint | `cargo clippy -p aien-runtime -p aien-cli --all-targets -- -D warnings`, `cargo fmt --check` | clean |
+| RUN-1 verdict unchanged | `tools/aien-verify` on a scratch copy of `runs/RUN-1-20261010T154724Z` | `verdict_id` as recorded in its `VERIFIER_RECEIPT.json` |
+
+## Results (2026-10-11, branch e2e/r6-run5)
+
+| check | result |
+|---|---|
+| new tests red on main | main 8c09217 plus the test commit only: does not compile (`strip_leading_curdir` missing, 10 errors). With an identity stand-in for that function (the behaviour of main): 4 of the 5 new tests FAIL (`leading_dot_slash_names_the_bare_path`, `an_edit_reply_naming_dot_slash_merges_into_the_named_file`, `strip_leading_curdir_removes_only_leading_dot_slash`, `a_goal_naming_dot_slash_names_the_bare_path`); `every_other_form_is_refused_as_before` passes, as it must on main |
+| new tests green | the 5 new tests pass |
+| `cargo test -p aien-runtime -p aien-cli -- --test-threads=1` (linked compose archive sha256 3eb20f5e...) | 617 passed, 0 failed, 23 ignored |
+| grant backstop unchanged | `grants_are_confined_and_the_approved_kind_is_reserved` passes unchanged (`./N.md` grant still refused) |
+| lint | `cargo clippy -p aien-runtime -p aien-cli --all-targets -- -D warnings` clean; `cargo fmt --check` clean |
+| RUN-1 verdict unchanged | `tools/aien-verify` on a scratch copy of `runs/RUN-1-20261010T154724Z`: `verdict_id a50fccb63363ef9224a19bd8bf4f249754abf5d88667ba0fd6ce93dfb8d63d80`, chain_unbroken true (as recorded) |
+
+Limits: unit level only; the chip path is exercised by the next declared attempt (RUN-5-GB10). The model may still answer
+in other forms that stay refused (for example an absolute path); this repair covers only a leading `./`. Attempt 1 of
+RUN-3 E4 was refused for another reason ("edit reply changes nothing in the file"), which this change does not touch.
+`runs/` was not edited.