Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
merged280bbdd6c43ab00f #687 · opened 2026-10-24 09:12 UTC · closed 2026-11-06 04:06 UTC · merged 2026-11-06 04:06 UTC
Imported from GitHub aien-dev/omega-mv#687, by drakestapleton
Base 4baf03575616d0e64859ed6b2d1c1426ca7ba62c · Head 1fc46e2dbe938b5f560cd1846b88f61c34c3a1bf
Merged on GitHub as 0fe0930780b6f88b95dbf9cc56f07d2dbfb6b5a3; reachable from main c7acd2607139eedfabeac16b6042cefe8ede431f (observed 2026-11-18T16:35:46Z)
drakestapleton wrote on 2026-10-24 09:12 UTC
Evidence 2026-10-31 (AuthStack lane, head 1fc46e2dbe938b5f560cd1846b88f61c34c3a1bf)
Classification vs main 1db94162 (#970): NOT_CONTAINED. #970 squash-merged fix/security673-qualified (head 03ec4baf, tree 0d4d15a9 == main tree); every commit this stack inherited from it (dd6c4ad7 and earlier) is an ancestor of 03ec4baf and is on main. The stack's own changes are not on main (main seed/authority/dispatch.om still calls readrec before lacq; lock.om lrm returns 0 on unlink failure; no store-exact/store-cleanup/dispatch-order gates on main). Base stays as is (parent not merged).
Compiler: seed/out/omc sha256 7a8b84fcc07808a52e6cbb65aa7450c754b3ad62eeddf9ec64cc0edd0938b2de, reproduced by sh seed/omega-from-seed.sh (rc 0, no diff). All runs under taskset -c 6-9,15-19 nice -n 19 ionice -c3, Linux AArch64 host (DGX Spark), repo root as cwd. Helper /tmp/prfix/AuthStack-qual.sh; logs /tmp/prfix/AuthStack-logs/<N>/.
Merged updated #686 (.crumb parent side + recompile; CONTRIBUTORS.md union, both sides' rows kept); README native results commit 1fc46e2d.
MEASURED: lock-gate lock checks=8 fails=0 exit 0; negative control with lock.om from main 1db94162 (lrm returns 0): no pass line, exit 1 (failed-check exit; setup errors are 100..102); dispatch 37, dispatch-order 3, store 77, store-exact 4 exit 0; gate669 exit 0 PASS; crumb verify OK 184; zero-disk-secrets exit 0; om-units exit 0.
NOT_RUN: hosted CI pending at push. NOT_RUN is not PASS. Host AArch64 runs are not hardware qualification.
Verification
PASS: whitespace checks; all five gate-source concatenations; pinned crumb verification (157 current). Published tree 4d15bad2c815d2e7298962afc4faa089977aa290 matches the locally reviewed candidate. Parent independently reviewed lrm/lrel callers and the added refusal cases.
NOT_RUN: native compilation, fixed and old-source controls, dispatch/full security gates, independent AArch64 replay. This remains a draft; no native PASS or general robust-lock guarantee is claimed.
Minimal correction
lrm previously returned zero for both failed and successful unlink, so release failure was hidden even from the dispatcher's existing pre-effect check. Return 41 on negative unlink and retain zero on success. No lock protocol redesign.
Extend the existing handwritten .om gate from five to eight checks: successful final release, directory unlink refusal and missing-path refusal. The directory case is deterministic even as root. Require a disposable test directory, never a live authority store. Refresh lock/dispatch concatenations and generated metadata; preserve all historical evidence bytes.
Stacked on #686 (666728518ec0ce7580328dc926b5db8409ef664a), retaining #685's protected-read fix. Refs #649, #670, #673. Other ignored cleanup/final-release results and stale-owner races remain disclosed, not silently certified.
Candidate 19948824fea22e66499af02f27feef3ce9efa5d9. Source-only review note: evidence/SECURITY-673/lock-release-errors/REVIEW.md. No automatic issue closure.
Fetch it
A git bundle of the pull request's head, 8866 bytes.
diff --git a/.crumb b/.crumb
index 59286e8e8..196b83fab 100644
--- a/.crumb
+++ b/.crumb
@@ -108,14 +108,14 @@
}
],
"children_root": "sha256:4b14d5958f47b6630055cf4a2246a89549620f97b64495ebf50844cac8cae2f9",
- "compiled_at": "2026-10-31T05:02:41Z",
+ "compiled_at": "2026-10-31T05:03:36Z",
"compiler": "crumb-compile/1",
- "digest": "sha256:0c9346d8bf0cc410efbf1c4861608ccd8bc8128a521489807da6f8c7aec6188f",
- "evidence_files": 14991,
- "evidence_root": "sha256:1b7f806cd08d07db412b46fe3506748b42e94f87ff330d49cc47364831dff4b8",
- "files": 23188,
- "generated_at_commit": "7d57fa6bb70b42ab893e7df864180a31755f28c3",
- "source_tree": "sha256:46a3f83a82fb0faf8cae952713f5cbcfe07fd18c0a27c2f8dab3cca8c19fc7f2"
+ "digest": "sha256:4852afebbd50704c45de5523ee5ea12c4a022633bbdf191f67f257e731decc21",
+ "evidence_files": 14992,
+ "evidence_root": "sha256:af2893ddec374ff41e6ac67782c79466fd24e2968169bb97988bd8b02ae16c23",
+ "files": 23189,
+ "generated_at_commit": "7e38ee6f352002e180b2932afbca8e281b42bea0",
+ "source_tree": "sha256:f2dad2afe172d68e61cfccdecb406153892438f6754fabdf63cb92b6cad3e86c"
},
"owner_lane": "",
"provenance": {
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 522977f8d..0c7f98867 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -7,6 +7,7 @@ The current development method is [Human-Directed Agentic Engineering (HDAE)](RE
| Model | What it did |
|---|---|
+| Codex | Seeded authority lock unlink-error reporting and deterministic directory/missing-path regression (source-reviewed; native execution pending) |
| Claude Opus 5.5 (via omp) | Made `om/evidence/parity/run.sh` independent of the filesystem under `TMPDIR`. The pathtree and digtree listings hashed each directory's `find %s` size, which is 4096 on ext4 and 40..3800 on tmpfs, so the harness failed on tmpfs with correct output. Directories now list `-` for size. The two expected hashes were re-derived from the same trees: on ext4 the old listing still hashes to the recorded C-oracle values, and the new one matches on ext4 and tmpfs. The mkdir_mode and file_mode mutants are still killed. |
| OpenAI Codex | C6 comparison harness: preserve decoder exit status before normalization; host-only serial and parallel regression controls reject nonzero exits despite identical output. |
| Claude Opus 5.5 (via omp) | #944 (#601, #560): the OM_COMPLETION FR-5 row records the shipped handle-checked mapping and device words (ids 166..177, contracts in `seed/host/MAPPING.md`, the four `seed/host/tests` units run by `seed/host/gate.sh`), and FR-5 leaves the decision-blocked list. The tern header's shared-memory comment states the 32 KiB QMD limit and that one 8192-column x chunk is 16 KiB. Docs and comments only. |
diff --git a/evidence/SECURITY-673/lock-release-errors/REVIEW.md b/evidence/SECURITY-673/lock-release-errors/REVIEW.md
new file mode 100644
index 000000000..f08b7cd63
--- /dev/null
+++ b/evidence/SECURITY-673/lock-release-errors/REVIEW.md
@@ -0,0 +1,54 @@
+# Lock release error reporting: source-only candidate
+
+Source base: `a35697e94b5eeb72efadfee6edab7f14344aea43` (`fix/security673-qualified`).
+Stack parent: `666728518ec0ce7580328dc926b5db8409ef664a` (#686).
+Review date: 2026-10-24. Scope: #649/#670 authority store, #673 tracker.
+Remote base was rechecked before editing; open PRs #685/#686 overlap the generated
+`dispatch-gate.om` and are retained in this stacked correction.
+
+## Defect and minimal correction
+
+`lock.om::lrm` returned zero on both negative and successful `unlink` results. Consequently
+`lrel` always claimed success and the existing dispatcher pre-effect error check could
+never observe a failed release. Return 41 for a negative result; retain zero on success.
+This is source-confirmed, not a native runtime reproduction or exploit demonstration.
+
+Caller review:
+- `lrel` directly forwards the result.
+- `ltry` already maps a nonzero stale-lock removal result to 41; this branch is now reachable.
+- `dispatch` checks the release before starting its effect and returns 78 on failure.
+- Other dispatcher error cleanup and final-release sites ignore `lrel`; unchanged here.
+- Existing lock-test initial best-effort cleanup ignores a missing-path error intentionally.
+
+This does not repair automatic stale-reclaim races, PID reuse, lock-file ownership, or
+ignored cleanup/final-release failures. No production consumer cutover, compiler, ABI,
+locking protocol redesign, or historical receipt change is included.
+
+## Regression and expected negative control
+
+The existing lock test retains all five checks, adds an explicit successful final release
+check, creates a directory at the now-empty lock path, checks release returns 41, removes
+that directory with `rmdir`, then checks missing-path release also returns 41. Directory
+unlink is refused independently of permission/root status. Fixture creation/removal errors
+exit 101/102. Use a disposable working directory with no active authority store, as with
+the existing file/fork fixture; the suite is not safe against a live store.
+
+Expected fixed result: `lock checks=8 fails=0`, exit 0. Expected old-source control:
+concatenate the base's `lock.om` with the new `lock-test.om`; it remains compilable without
+new implementation symbols, but the two failed-unlink checks increment fails and main
+returns 1 without a pass message. These are expectations, NOT observed runtime results.
+
+## Verification status
+
+- PASS: `git diff --check`.
+- Qualification coordinator already compiles/runs the lock gate and checks child exit;
+ it has no hardcoded lock stdout count to change.
+- PASS: lock gate equals lock + lock-test; dispatch gate equals action + store + lock +
+ dispatch + dispatch-test. No other authoritative source embedding of lrm exists.
+- Source review: eight check calls; ordinary release0, failed release41; rmdir primitive
+ already used by seeded host directory tests; qualification coordinator observes exit.
+- NOT_RUN: native compilation, fixed/old-source execution, existing dispatch and full
+ security gates, independent AArch64 replay. Editing host is x86_64; no bundled seed
+ executable ran and no toolchain was installed.
+
+Source checks are not functional qualification. Keep draft and preserve all required gates.
diff --git a/seed/authority/README.md b/seed/authority/README.md
index dbd20456a..c453b8098 100644
--- a/seed/authority/README.md
+++ b/seed/authority/README.md
@@ -14,7 +14,7 @@ dispatcher are the next phase; the C owner remains active until every consumer i
| `store.om` | durable 32-word record and generation file: temp write, fsync, atomic rename, exact 256-byte read; torn/short files refused |
| `dispatch.om` | persists in-flight, runs /bin/true and a static execpure effect, records performed/unknown, and marks unknown if the generation changes during the effect |
| `lock.om` | cross-process O_EXCL pid lock with bounded retry and stale-pid reclaim; serializes read-check-persist, not the effect |
-| `lock-test.om` | exclusive acquire, busy refusal, release, forked waiter and stale-pid reclaim |
+| `lock-test.om` | exclusive acquire, busy refusal, release, forked waiter, stale-pid reclaim and failed-release reporting |
| `*-test.om` | transition and store checks; no provider simulation |
| `*-gate.om` | source + test concatenation for the current single-file compiler |
@@ -43,7 +43,7 @@ Expected output and exit:
| reuse | `reuse checks=074 000` | 0 |
| store | `store checks=077 000` | 0 |
| dispatch | `dispatch checks=037 000` | 0 |
-| lock | `lock checks=5 fails=0` | 0 |
+| lock | `lock checks=8 fails=0` | 0 |
The authority gates and the standalone lock gate are run by
`seed/qualification/security673/gate669.om` as part of the security qualification; the dispatcher
@@ -132,6 +132,21 @@ exit 1. Store (77), dispatch (37), dispatcher-order (3) and lock (5) gates pass
also lacked the already-existing `sgerr` generation-error interface; it now tests the current
implementation rather than preserving that stale copy.
+## Lock release errors
+
+`lrm`/`lrel` return 0 only when unlink succeeds, and 41 on unlink failure (including
+an absent path). The lock gate checks ordinary release, directory refusal and
+missing-path refusal. Its directory fixture is removed with `rmdir`; run gates
+only in disposable test working directories, never against an active store.
+
+The pre-effect dispatcher release check returns 78 on this failure. Other dispatcher
+cleanup and final-release sites still ignore the release result; this change does not
+claim those paths report it, nor does it redesign stale-lock reclamation.
+
+Native run (2026-10-31, Linux AArch64, seed/out/omc 7a8b84fc): `lock checks=8 fails=0`, exit 0.
+Negative control with `lock.om` from main 1db94162 (`lrm` returns 0 on unlink failure): no pass
+line, exit 1 (the gate's failed-check exit; its setup errors exit 100..102).
+
## Fixture source correction (2026-10-24)
The dispatcher-order fixture now uses global/text names within the existing
diff --git a/seed/authority/dispatch-gate.om b/seed/authority/dispatch-gate.om
index 626d01707..a9a7acaed 100644
--- a/seed/authority/dispatch-gate.om
+++ b/seed/authority/dispatch-gate.om
@@ -399,7 +399,7 @@ end
fn lrm to ulong
r = unlink lpath 0 len lpath
if lt r 0
-ret 0
+ret 41
end
ret 0
end
diff --git a/seed/authority/lock-gate.om b/seed/authority/lock-gate.om
index 64f1e271d..abd580201 100644
--- a/seed/authority/lock-gate.om
+++ b/seed/authority/lock-gate.om
@@ -64,7 +64,7 @@ end
fn lrm to ulong
r = unlink lpath 0 len lpath
if lt r 0
-ret 0
+ret 41
end
ret 0
end
@@ -114,8 +114,8 @@ fn lrel to ulong
ret lrm
end
note SPDX-License-Identifier: AGPL-3.0-only
-note Lock checks: exclusive acquire, busy refusal, release, a forked waiter, and stale-pid reclaim.
-text passm "lock checks=5 fails=0\n"
+note Lock checks: exclusive acquire, busy refusal, release, a forked waiter, stale-pid reclaim, and failed release.
+text passm "lock checks=8 fails=0\n"
global checks ulong 1
global fails ulong 1
global lbuf uchar 8
@@ -204,6 +204,22 @@ end
u = ltry ulong getpid
check u 0
u = lrel
+check u 0
+note A directory cannot be unlinked as a regular file, even when run as root.
+note Refuse a pre-existing fixture rather than replacing anything at this path.
+r = makedir lpath 0 len lpath 448
+if ne r 0
+ret 101
+end
+u = lrel
+check u 41
+r = rmdir lpath 0 len lpath
+if ne r 0
+ret 102
+end
+note Missing-path removal is also a failure, not an idempotent success.
+u = lrel
+check u 41
if ne get fails 0 0
ret 1
end
diff --git a/seed/authority/lock-test.om b/seed/authority/lock-test.om
index 9733f31e6..641bbb81e 100644
--- a/seed/authority/lock-test.om
+++ b/seed/authority/lock-test.om
@@ -1,6 +1,6 @@
note SPDX-License-Identifier: AGPL-3.0-only
-note Lock checks: exclusive acquire, busy refusal, release, a forked waiter, and stale-pid reclaim.
-text passm "lock checks=5 fails=0\n"
+note Lock checks: exclusive acquire, busy refusal, release, a forked waiter, stale-pid reclaim, and failed release.
+text passm "lock checks=8 fails=0\n"
global checks ulong 1
global fails ulong 1
global lbuf uchar 8
@@ -89,6 +89,22 @@ end
u = ltry ulong getpid
check u 0
u = lrel
+check u 0
+note A directory cannot be unlinked as a regular file, even when run as root.
+note Refuse a pre-existing fixture rather than replacing anything at this path.
+r = makedir lpath 0 len lpath 448
+if ne r 0
+ret 101
+end
+u = lrel
+check u 41
+r = rmdir lpath 0 len lpath
+if ne r 0
+ret 102
+end
+note Missing-path removal is also a failure, not an idempotent success.
+u = lrel
+check u 41
if ne get fails 0 0
ret 1
end
diff --git a/seed/authority/lock.om b/seed/authority/lock.om
index bc3acb723..a0f868631 100644
--- a/seed/authority/lock.om
+++ b/seed/authority/lock.om
@@ -64,7 +64,7 @@ end
fn lrm to ulong
r = unlink lpath 0 len lpath
if lt r 0
-ret 0
+ret 41
end
ret 0
end