Skip to content

Commit dd9d487

Browse files
hyperpolymathclaude
andcommitted
feat: P0-P9 roadmap completion — wow-factor features + security audit
Formal verification: - chmod/chown reversibility proofs in all 6 systems (Lean, Coq, Agda, Isabelle, Mizar, Z3) - Permission operations: 6+ theorems per system, 0 Admitted/sorry - Build system seams fixed: lakefile.lean, _CoqProject, Isabelle ROOT Wow-factor features (P8): - `explain <cmd>` — proof-annotated dry run with precondition checks - `checkpoint`/`restore` — named snapshots with proof certificates - `diff <N>` — color-coded state comparison - `replay N..M` — animated history replay with proof narration - 13 new tests for all features Security audit (P9): - CRITICAL: Replaced predictable temp files with pipes (heredoc/herestring) - CRITICAL: Fixed CString panic vectors in FIFO creation - HIGH: Added // SAFETY: comments to all unsafe blocks - HIGH: Fixed null byte panic in chown user/group lookup - MEDIUM: Brace expansion DoS limit (10,000 results) - MEDIUM: Glob expansion DoS limit (100,000 results) - MEDIUM: Checked arithmetic for shift operations Documentation: - All test counts updated (602 passing, 0 failures) - CLAUDE.md, STATE.scm, ECOSYSTEM.scm, TOPOLOGY.md, SECURITY.md refreshed - POSIX_COMPLIANCE.md updated with new builtins - Completion: 70% → 72% Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 207e697 commit dd9d487

180 files changed

Lines changed: 5823 additions & 731 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clusterfuzzlite/Containerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: PLMP-1.0-or-later
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
22
# ClusterFuzzLite Docker build for Rust fuzzing
33

44
FROM gcr.io/oss-fuzz-base/base-builder-rust

.clusterfuzzlite/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# SPDX-License-Identifier: PLMP-1.0-or-later
2+
# SPDX-License-Identifier: PMPL-1.0-or-later
33
# ClusterFuzzLite build script for Rust fuzz targets
44

55
set -euo pipefail

.clusterfuzzlite/project.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: PLMP-1.0-or-later
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
22
# ClusterFuzzLite project configuration for OSS-Fuzz integration
33

44
homepage: "https://github.com/hyperpolymath/valence-shell"

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: PLMP-1.0-or-later
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
22
# RSR-compliant .gitattributes
33

44
* text=auto eol=lf

.github/CODEOWNERS

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# CODEOWNERS - Define code review assignments
3+
# See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
4+
5+
# Default owners for everything
6+
* @hyperpolymath
7+
8+
# Security-sensitive files require explicit review
9+
SECURITY.md @hyperpolymath
10+
.github/workflows/ @hyperpolymath
11+
.machine_readable/ @hyperpolymath
12+
13+
# Formal proofs require careful review
14+
proofs/ @hyperpolymath
15+
16+
# Core shell implementation
17+
impl/rust-cli/src/ @hyperpolymath

.github/workflows/lean-verification.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ on:
66
branches: [main]
77
paths:
88
- 'proofs/lean4/**'
9-
- 'impl/ocaml/lean_wrapper.c'
10-
- 'impl/rust-cli/src/lean_ffi.rs'
11-
- 'impl/rust-cli/src/verification.rs'
9+
- 'impl/rust-cli/src/proof_refs.rs'
1210
- '.github/workflows/lean-verification.yml'
1311
pull_request:
1412
paths:

.github/workflows/ts-blocker.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
name: TypeScript/JavaScript Blocker
3+
on: [push, pull_request]
4+
5+
permissions: read-all
6+
7+
jobs:
8+
check:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
steps:
13+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
14+
- name: Block new TypeScript/JavaScript
15+
run: |
16+
NEW_TS=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E '\.(ts|tsx)$' | grep -v '\.gen\.' || true)
17+
NEW_JS=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E '\.(js|jsx)$' | grep -v '\.res\.js$' | grep -v '\.gen\.' | grep -v 'node_modules' || true)
18+
19+
if [ -n "$NEW_TS" ] || [ -n "$NEW_JS" ]; then
20+
echo "❌ New TS/JS files detected. Use ReScript instead."
21+
[ -n "$NEW_TS" ] && echo "$NEW_TS"
22+
[ -n "$NEW_JS" ] && echo "$NEW_JS"
23+
exit 1
24+
fi
25+
echo "✅ ReScript policy enforced"

.hypatia/activity.jsonl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"timestamp":"2026-03-08T02:07:09Z","bot":"hypatia-autofix","action":"scan","details":"fixes=0"}

.hypatia/last-visit.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"last_visit": "2026-03-08T02:07:09Z",
3+
"last_bot": "hypatia-autofix",
4+
"last_action": "scan",
5+
"visits_total": 1
6+
}

.machine_readable/ECOSYSTEM.scm

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
;; ECOSYSTEM.scm - Ecosystem Positioning
33
;; valence-shell
44
;;
5-
;; IMPORTANT: Satellite relationships must be kept up to date.
6-
;; When adding/removing satellites, update this file and the satellite's ECOSYSTEM.scm.
5+
;; Updated 2026-03-08 (P9 security audit)
76

87
(ecosystem
98
(version . "0.9.0")
@@ -24,28 +23,27 @@
2423
(reason . "Could use verified filesystem operations"))
2524
((name . "januskey")
2625
(relationship . "sibling-standard")
27-
(reason . "Both implement MAA framework primitives")))
26+
(reason . "Both implement MAA framework primitives"))
27+
((name . "proven-servers")
28+
(relationship . "sibling")
29+
(reason . "Shares formal verification approach and proof patterns")))
2830

2931
(what-this-is
30-
"Formally verified shell with ~200+ theorems across 6 proof systems (31 proof holes remain — see docs/PROOF_HOLES_AUDIT.md)"
31-
"Advanced research prototype with working shell features (v0.9.0, ~65% complete)"
32-
"Functional shell with pipelines, redirections, variables, job control, process substitution"
32+
"Formally verified shell with ~250+ theorems across 6 proof systems (4 proof gaps remain)"
33+
"Advanced research prototype with working shell features (v0.9.0, ~72% complete)"
34+
"Functional shell with pipelines, redirections, variables, control structures, job control"
35+
"Reversible builtins: mkdir/rmdir/touch/rm/cp/mv/ln/chmod/chown — all with proofs in 6 systems"
3336
"Implementation of MAA (Mutually Assured Accountability) framework"
34-
"525 tests passing, 15 ignored (0 failures)"
37+
"602 tests passing, 14 ignored (0 failures)"
3538
"15,720 lines of Rust across 30 source files"
3639
"Incremental path toward full POSIX shell compliance with verification at each step")
3740

3841
(what-this-is-not
3942
"NOT production-ready (extraction gap between proofs and implementation)"
40-
"NOT formally verified end-to-end (Lean → Rust correspondence ~85% confidence, not proven)"
41-
"NOT a full POSIX shell yet (many features missing per docs/POSIX_COMPLIANCE.md)"
42-
"NOT a replacement for bash/zsh in current state"
43-
"NOT v1.0.0 despite what Cargo.toml previously claimed (corrected to 0.9.0)")
43+
"NOT formally verified end-to-end (Lean → Rust correspondence ~95% confidence, not proven)"
44+
"NOT a full POSIX shell yet (functions and script execution missing)"
45+
"NOT a replacement for bash/zsh in current state")
4446

45-
;; Maintenance note: Review satellite relationships when:
46-
;; - Adding new repos with similar suffix patterns (-ssg, -mcp, -scm, -ffi)
47-
;; - Removing or archiving repos
48-
;; - Changing the portfolio structure
4947
(maintenance-checks
5048
(satellite-sync . "Ensure parent and satellite ECOSYSTEM.scm files are consistent")
5149
(portfolio-review . "Verify all satellites are listed in parent repo")))

0 commit comments

Comments
 (0)