From dd3cae95b1f1b54494aa8bccc86c6c2b91fb8ada Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Mon, 24 Aug 2026 21:45:12 +0100 Subject: [PATCH] fix(carve-out): archive session detritus --- .gitattributes | 7 + .machine_readable/REGISTRY.a2ml | 6 +- Justfile | 11 +- QUICKSTART-DEV.adoc | 6 +- TEST-NEEDS.adoc | 2 +- .../reorg-leftovers}/CRG-TRG-RSR-MAPPING.a2ml | 0 .../reorg-leftovers}/K9-AUTOMATION-SPEC.a2ml | 0 .../TEMPLATE-VERSIONING-SPEC.a2ml | 0 .../archive/scaffolding/audit-contractiles.sh | 109 ++++++++ docs/archive/scaffolding/contractile.just | 64 +++++ docs/archive/scaffolding/stapeln.toml | 90 +++++++ ...TEKEEPER-PROTOCOL-COMPLETE-2026-02-07.adoc | 0 .../axel-protocol}/SONNET-TASKS.adoc | 0 .../root/SECURITY_TRAINING_SUMMARY.md | 244 ++++++++++++++++++ scripts/check-language-guide.sh | 9 +- scripts/tests/wave5-language-guides-test.sh | 4 +- scripts/tests/wave9-session-detritus-test.sh | 75 ++++++ toolchain-readiness-grades/README.adoc | 6 + .../testing/LANGUAGE-TESTING-STANDARDS.adoc | 14 +- .../testing}/affinescript-testing-guide.adoc | 6 +- .../testing}/julia-testing-tools-guide.adoc | 0 .../language-testing-guide-TEMPLATE.adoc | 4 +- 22 files changed, 627 insertions(+), 30 deletions(-) rename {interop => docs/archive/reorg-leftovers}/CRG-TRG-RSR-MAPPING.a2ml (100%) rename {automation => docs/archive/reorg-leftovers}/K9-AUTOMATION-SPEC.a2ml (100%) rename {templates => docs/archive/reorg-leftovers}/TEMPLATE-VERSIONING-SPEC.a2ml (100%) create mode 100755 docs/archive/scaffolding/audit-contractiles.sh create mode 100644 docs/archive/scaffolding/contractile.just create mode 100644 docs/archive/scaffolding/stapeln.toml rename {0-ai-gatekeeper-protocol => docs/archive/session-detritus/0-ai-gatekeeper-protocol}/AI-GATEKEEPER-PROTOCOL-COMPLETE-2026-02-07.adoc (100%) rename {axel-protocol => docs/archive/session-detritus/axel-protocol}/SONNET-TASKS.adoc (100%) create mode 100644 docs/archive/session-detritus/root/SECURITY_TRAINING_SUMMARY.md create mode 100755 scripts/tests/wave9-session-detritus-test.sh rename docs/language-testing-standards.adoc => toolchain-readiness-grades/testing/LANGUAGE-TESTING-STANDARDS.adoc (95%) rename {docs => toolchain-readiness-grades/testing}/affinescript-testing-guide.adoc (96%) rename {docs => toolchain-readiness-grades/testing}/julia-testing-tools-guide.adoc (100%) rename {templates => toolchain-readiness-grades/testing}/language-testing-guide-TEMPLATE.adoc (94%) diff --git a/.gitattributes b/.gitattributes index 6d99ca08..0609be34 100644 --- a/.gitattributes +++ b/.gitattributes @@ -26,6 +26,13 @@ *.adoc text eol=lf *.txt text eol=lf +# These historical artefacts are byte-preserved evidence; do not rewrite or +# reject their pre-existing whitespace during archival recovery. +docs/archive/scaffolding/audit-contractiles.sh -whitespace +docs/archive/scaffolding/contractile.just -whitespace +docs/archive/scaffolding/stapeln.toml -whitespace +docs/archive/session-detritus/root/SECURITY_TRAINING_SUMMARY.md -whitespace + # Data *.json text eol=lf *.yaml text eol=lf diff --git a/.machine_readable/REGISTRY.a2ml b/.machine_readable/REGISTRY.a2ml index ad1ca07e..11124a01 100644 --- a/.machine_readable/REGISTRY.a2ml +++ b/.machine_readable/REGISTRY.a2ml @@ -135,7 +135,7 @@ name = "0-AI Gatekeeper Protocol" stream = "protocol" home = "0-ai-gatekeeper-protocol/" canonical_doc = "0-ai-gatekeeper-protocol/README.adoc" -source_hash = "sha256:609558b5895d056289d5ea34033cc4625dda1503e58dd598f5b7cbe1bc60e3ba" +source_hash = "sha256:6098f922fe32867a903871fd8436a5126553673704870e3fd011b4609e568684" route = "the AI-agent entry/gating protocol behind 0-AI-MANIFEST" [[spec]] @@ -162,7 +162,7 @@ name = "AXEL Protocol" stream = "protocol" home = "axel-protocol/" canonical_doc = "axel-protocol/README.adoc" -source_hash = "sha256:2076ab707c155dddc70601c72380327f49d905ea37d1c67b6eb345bfef628ce6" +source_hash = "sha256:b0b7c07f4d63aa11557fa53d289010826bd5d84cb48489ee1f708af5d9c639dc" route = "age-gating + explicit-content enforcement" [[spec]] @@ -207,7 +207,7 @@ name = "TRG — Toolchain Readiness Grades" stream = "readiness" home = "toolchain-readiness-grades/" canonical_doc = "toolchain-readiness-grades/README.adoc" -source_hash = "sha256:b887d7d3f3e08b4d7020f225a13dec97f089509cad4f1192b2cf31af5a74e3a8" +source_hash = "sha256:6290b871c14e8e15ebc07602400bf49deba27724b70dced8e0c0ed7e44859fe5" route = "per-toolchain readiness profile templates" [[spec]] diff --git a/Justfile b/Justfile index c30faf82..dc7c0cd8 100644 --- a/Justfile +++ b/Justfile @@ -7,9 +7,6 @@ # enforcing: import? fails at parse time before any recipe can guard it. # See TOOLING-VERSION-INTEGRITY-POLICY.adoc (root cause: burble#39). -# Default recipe -import? "contractile.just" - default: @just --list @@ -176,6 +173,10 @@ test: test-runner-test: @bash scripts/tests/run-required-test-suite-test.sh +# standards#496 regression: archived artefacts stay out of live spec homes. +session-detritus-test: + @bash scripts/tests/wave9-session-detritus-test.sh + # Format sub-project code fmt: @echo "=== Standards Monorepo Format ===" @@ -218,8 +219,8 @@ doctor: @command -v git >/dev/null 2>&1 && echo " [OK] git" || echo " [FAIL] git not found" @echo "Checking for hardcoded paths..." @grep -rn '$HOME\|$ECLIPSE_DIR' --include='*.rs' --include='*.ex' --include='*.res' --include='*.gleam' --include='*.sh' . 2>/dev/null | head -5 || echo " [OK] No hardcoded paths" - @echo "Checking optional imports (import? does not fail when absent — report it)..." - @test -f contractile.just && echo " [OK] contractile.just present (import resolved)" || echo " [INFO] contractile.just absent — its recipes are unavailable (needs the external 'contractile' generator)" + @echo "Checking canonical contractiles source..." + @test -f .machine_readable/contractiles/dust/Dustfile.a2ml && echo " [OK] canonical Dustfile present" || echo " [FAIL] canonical Dustfile missing" @echo "Checking git hooks are installed..." @test -f "$(git rev-parse --git-dir)/hooks/pre-commit" && echo " [OK] pre-commit hook installed" || echo " [INFO] pre-commit hook not installed — run 'just hooks-install'" @echo "Diagnostics complete." diff --git a/QUICKSTART-DEV.adoc b/QUICKSTART-DEV.adoc index 68ca75ab..546a3240 100644 --- a/QUICKSTART-DEV.adoc +++ b/QUICKSTART-DEV.adoc @@ -43,7 +43,7 @@ nix develop ---- git clone https://github.com/hyperpolymath/standards.git cd standards -just setup-dev +just --list ---- == Build @@ -99,7 +99,7 @@ just build # Build the project just test # Run tests just doctor # Self-diagnostic just lint # Lint and format -just panic-scan # Security scan via panic-attacker +just assail # Security scan via panic-attacker just tour # Guided tour of the codebase ---- @@ -109,7 +109,7 @@ just tour # Guided tour of the codebase ---- just lint # Format and lint just test # All tests pass -just panic-scan # No new security issues +just assail # No new security issues ---- == Contractile Invariants diff --git a/TEST-NEEDS.adoc b/TEST-NEEDS.adoc index 49198e91..ea0bba28 100644 --- a/TEST-NEEDS.adoc +++ b/TEST-NEEDS.adoc @@ -4,7 +4,7 @@ To achieve CRG Grades B and above, projects MUST implement *Zigzag Testing* for their critical paths, following the -link:./ZIGZAG-TESTING.md[ZIGZAG-TESTING.md] methodology. +link:ZIGZAG-TESTING.adoc[ZIGZAG-TESTING.adoc] methodology. === CRG Grade: C — ACHIEVED 2026-04-04 diff --git a/interop/CRG-TRG-RSR-MAPPING.a2ml b/docs/archive/reorg-leftovers/CRG-TRG-RSR-MAPPING.a2ml similarity index 100% rename from interop/CRG-TRG-RSR-MAPPING.a2ml rename to docs/archive/reorg-leftovers/CRG-TRG-RSR-MAPPING.a2ml diff --git a/automation/K9-AUTOMATION-SPEC.a2ml b/docs/archive/reorg-leftovers/K9-AUTOMATION-SPEC.a2ml similarity index 100% rename from automation/K9-AUTOMATION-SPEC.a2ml rename to docs/archive/reorg-leftovers/K9-AUTOMATION-SPEC.a2ml diff --git a/templates/TEMPLATE-VERSIONING-SPEC.a2ml b/docs/archive/reorg-leftovers/TEMPLATE-VERSIONING-SPEC.a2ml similarity index 100% rename from templates/TEMPLATE-VERSIONING-SPEC.a2ml rename to docs/archive/reorg-leftovers/TEMPLATE-VERSIONING-SPEC.a2ml diff --git a/docs/archive/scaffolding/audit-contractiles.sh b/docs/archive/scaffolding/audit-contractiles.sh new file mode 100755 index 00000000..73d4b150 --- /dev/null +++ b/docs/archive/scaffolding/audit-contractiles.sh @@ -0,0 +1,109 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: MPL-2.0 +# Systemic Contractile Audit Script +# Audits all Hyperpolymath repositories for complete contractile implementation + +set -euo pipefail + +echo "═══════════════════════════════════════════════════════════════════════════════" +echo " Hyperpolymath Contractile System Audit" +echo " $(date '+%Y-%m-%d %H:%M:%S')" +echo "═══════════════════════════════════════════════════════════════════════════════" +echo "" + +# Repositories to audit. +# Previously these were hardcoded to the owner's machine (/var/mnt/eclipse/...), +# so the script could not run in CI or on any other host (Wave-0 fix). Supply +# repos explicitly as positional args, or via $CONTRACTILE_AUDIT_REPOS +# (colon-separated). With neither set, default to auditing THIS repo so a bare +# invocation is still useful — and never silently audit zero repos. +if [ "$#" -gt 0 ]; then + REPOS=("$@") +elif [ -n "${CONTRACTILE_AUDIT_REPOS:-}" ]; then + IFS=':' read -r -a REPOS <<< "$CONTRACTILE_AUDIT_REPOS" +else + SELF_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + REPOS=("$SELF_DIR") +fi + +if [ "${#REPOS[@]}" -eq 0 ]; then + echo "error: no repositories to audit (pass paths as args or set CONTRACTILE_AUDIT_REPOS)" >&2 + exit 2 +fi + +# Contractile types to check +# `lust` deprecated 2026-04-18 — wishes absorbed into intend/Intentfile.a2ml +CONTRACTILES=("must" "trust" "dust" "bust" "adjust" "intend") + +echo "## Contractile Completeness Audit" +echo "" + +for repo in "${REPOS[@]}"; do + if [ -d "$repo" ]; then + echo "### $(basename "$repo")" + + if [ -d "$repo/.machine_readable/contractiles" ]; then + for contractile in "${CONTRACTILES[@]}"; do + if [ -f "$repo/.machine_readable/contractiles/$contractile/Intentfile.a2ml" ] || \ + [ -f "$repo/.machine_readable/contractiles/$contractile/${contractile^}file.a2ml" ]; then + echo " ✅ $contractile: Present" + else + echo " ❌ $contractile: MISSING" + fi + done + else + echo " ❌ No contractiles directory" + fi + echo "" + fi +done + +echo "## K9-SVC Integration Audit" +echo "" + +for repo in "${REPOS[@]}"; do + if [ -d "$repo" ]; then + if grep -q "K9-SVC\|contractile" "$repo/.github/workflows/"*.yml 2>/dev/null || \ + grep -q "K9-SVC\|contractile" "$repo/.pre-commit-config.yaml" 2>/dev/null; then + echo " ✅ $(basename "$repo"): K9 integrated" + else + echo " ❌ $(basename "$repo"): K9 missing" + fi + fi +done + +echo "" +echo "## Accessibility Implementation Audit" +echo "" + +for repo in "${REPOS[@]}"; do + if [ -d "$repo" ]; then + if [ -d "$repo/server/lib/burble/accessibility" ] || \ + [ -f "$repo/.machine_readable/contractiles/adjust/Adjustfile.a2ml" ]; then + echo " ✅ $(basename "$repo"): Accessibility features present" + else + echo " ❌ $(basename "$repo"): No accessibility implementation" + fi + fi +done + +echo "" +echo "## Documentation Audit" +echo "" + +for repo in "${REPOS[@]}"; do + if [ -d "$repo" ]; then + if [ -f "$repo/docs/accessibility/README.adoc" ] || \ + grep -q "accessibility" "$repo/README.adoc" 2>/dev/null; then + echo " ✅ $(basename "$repo"): Accessibility documented" + else + echo " ❌ $(basename "$repo"): Accessibility documentation missing" + fi + fi +done + +echo "" +echo "═══════════════════════════════════════════════════════════════════════════════" +echo " Audit Complete" +echo " Total repositories checked: ${#REPOS[@]}" +echo "═══════════════════════════════════════════════════════════════════════════════" diff --git a/docs/archive/scaffolding/contractile.just b/docs/archive/scaffolding/contractile.just new file mode 100644 index 00000000..f76f5afc --- /dev/null +++ b/docs/archive/scaffolding/contractile.just @@ -0,0 +1,64 @@ +# Auto-generated by: contractile gen-just +# Source directory: contractiles +# Re-generate with: contractile gen-just --dir contractiles +# +# SPDX-License-Identifier: MPL-2.0 + +# === INTEND (Declared Future Intent) === +# Source: Intentfile.a2ml + +# Display declared future intents +intend-list: + @echo '=== Declared Intent ===' + @echo '' + @echo 'Purpose:' + @echo '' + @echo 'Anti-Purpose:' + @echo ' - A fork or wrapper around another tool' + @echo ' - A monorepo (unless explicitly structured as one)' + @echo '' + @echo 'If In Doubt:' + + +# === TRUST (Integrity & Provenance Verification) === +# Source: Trustfile.a2ml + +# Run all trust verifications +trust-verify: trust-license-content trust-no-secrets-committed + @echo 'All trust verifications passed' + +# LICENSE contains expected SPDX identifier +trust-license-content: + grep -q 'SPDX\|License\|MIT\|Apache\|PMPL\|MPL' LICENSE + +# No .env or credential files in repo +trust-no-secrets-committed: + test ! -f .env && test ! -f credentials.json && test ! -f .env.local + + +# === K9 Components === + +# K9 component: contractiles/k9/examples/ci-config.k9.ncl +k9-ci-config: + contractile k9 run contractiles/k9/examples/ci-config.k9.ncl + +# K9 component: contractiles/k9/examples/project-metadata.k9.ncl +k9-project-metadata: + contractile k9 run contractiles/k9/examples/project-metadata.k9.ncl + +# K9 component: contractiles/k9/examples/setup-repo.k9.ncl +k9-setup-repo: + contractile k9 run contractiles/k9/examples/setup-repo.k9.ncl + +# K9 component: contractiles/k9/template-hunt.k9.ncl +k9-template-hunt: + contractile k9 run contractiles/k9/template-hunt.k9.ncl + +# K9 component: contractiles/k9/template-kennel.k9.ncl +k9-template-kennel: + contractile k9 run contractiles/k9/template-kennel.k9.ncl + +# K9 component: contractiles/k9/template-yard.k9.ncl +k9-template-yard: + contractile k9 run contractiles/k9/template-yard.k9.ncl + diff --git a/docs/archive/scaffolding/stapeln.toml b/docs/archive/scaffolding/stapeln.toml new file mode 100644 index 00000000..f91f7c52 --- /dev/null +++ b/docs/archive/scaffolding/stapeln.toml @@ -0,0 +1,90 @@ +# SPDX-License-Identifier: MPL-2.0 +# stapeln.toml — Layer-based container build for standards +# +# stapeln builds containers as composable layers (German: "to stack"). +# Each layer is independently cacheable, verifiable, and signable. + +[metadata] +name = "standards" +version = "0.1.0" +description = "standards" +author = "Jonathan D.A. Jewell " +license = "PMPL-1.0-or-later" +registry = "ghcr.io/hyperpolymath" + +[build] +containerfile = "Containerfile" +context = "." +runtime = "podman" + +# ── Layer Definitions ────────────────────────────────────────── + +[layers.base] +description = "Chainguard Wolfi minimal base" +from = "cgr.dev/chainguard/wolfi-base:latest" +cache = true +verify = true + +[layers.toolchain] +description = "Build tools and dependencies" +extends = "base" +packages = ["julia"] +cache = true + +[layers.build] +description = "standards build" +extends = "toolchain" +commands = ["julia --project=. -e \"using Pkg; Pkg.instantiate()\""] + +[layers.runtime] +description = "Minimal runtime" +from = "cgr.dev/chainguard/wolfi-base:latest" +packages = ["ca-certificates", "curl"] +copy-from = [ + { layer = "build", src = "/app/", dst = "/app/" }, +] +entrypoint = ["/app/bin/standards"] +user = "nonroot" + +# ── Security ─────────────────────────────────────────────────── + +[security] +non-root = true +read-only-root = false +no-new-privileges = true +cap-drop = ["ALL"] +seccomp-profile = "default" + +[security.signing] +algorithm = "ML-DSA-87" +provider = "cerro-torre" + +[security.sbom] +format = "spdx-json" +output = "sbom.spdx.json" +include-deps = true + +# ── Verification ────────────────────────────────────────────── + +[verify] +vordr = true +svalinn = true +scan-on-build = true +fail-on = ["critical", "high"] + +# ── Targets ─────────────────────────────────────────────────── + +[targets.development] +description = "Full development environment" +layers = ["base", "toolchain", "build"] +env = { LOG_LEVEL = "debug" } + +[targets.production] +description = "Production deployment" +layers = ["runtime"] +env = { LOG_LEVEL = "info" } + +[targets.test] +description = "Test environment" +layers = ["base", "toolchain", "build"] +env = { LOG_LEVEL = "debug" } diff --git a/0-ai-gatekeeper-protocol/AI-GATEKEEPER-PROTOCOL-COMPLETE-2026-02-07.adoc b/docs/archive/session-detritus/0-ai-gatekeeper-protocol/AI-GATEKEEPER-PROTOCOL-COMPLETE-2026-02-07.adoc similarity index 100% rename from 0-ai-gatekeeper-protocol/AI-GATEKEEPER-PROTOCOL-COMPLETE-2026-02-07.adoc rename to docs/archive/session-detritus/0-ai-gatekeeper-protocol/AI-GATEKEEPER-PROTOCOL-COMPLETE-2026-02-07.adoc diff --git a/axel-protocol/SONNET-TASKS.adoc b/docs/archive/session-detritus/axel-protocol/SONNET-TASKS.adoc similarity index 100% rename from axel-protocol/SONNET-TASKS.adoc rename to docs/archive/session-detritus/axel-protocol/SONNET-TASKS.adoc diff --git a/docs/archive/session-detritus/root/SECURITY_TRAINING_SUMMARY.md b/docs/archive/session-detritus/root/SECURITY_TRAINING_SUMMARY.md new file mode 100644 index 00000000..dadc378c --- /dev/null +++ b/docs/archive/session-detritus/root/SECURITY_TRAINING_SUMMARY.md @@ -0,0 +1,244 @@ +# Security Training and Standards Implementation Summary + +**Date:** 2024-04-14 +**Version:** 1.0.0 + +## Task Completion Summary + +### ✅ Task 1: Integrate Clippy, Rustfmt, and Cargo Audit into CI/CD + +**Status:** ✅ **COMPLETE** + +The Rust project (`asdf-acceleration-middleware`) already has comprehensive integration: + +**GitHub Actions (`rust-ci.yml`):** +- ✅ Clippy: `cargo clippy --all-targets --all-features -- -D warnings` +- ✅ Rustfmt: `cargo fmt --all -- --check` +- ✅ Cargo Audit: `cargo audit` +- ✅ Additional: cargo-geiger, cargo-outdated, cargo-tarpaulin + +**GitLab CI (`.gitlab-ci.yml`):** +- ✅ Clippy: Full project linting +- ✅ Rustfmt: Format checking +- ✅ Cargo Audit: Security audit +- ✅ Additional: cargo-geiger, cargo-license + +**No changes needed** - existing implementation exceeds requirements. + +### ✅ Task 2: Conduct Regular Audits + +**Status:** ✅ **IMPLEMENTED** + +**Current Implementation:** +- Security audit job runs on every push/pull request +- GitLab CI has dedicated `security` stage +- `allow_failure: true` ensures CI doesn't block on findings +- Multiple security tools provide comprehensive coverage + +**Recommendations Documented:** +- Monthly dependency updates +- Weekly security advisory reviews +- Quarterly pipeline performance reviews +- Scheduled audit runs (not just on push) + +### ✅ Task 3: Provide Training on Best Practices + +**Status:** ✅ **COMPLETED** + +**Training Materials Created:** + +1. **`standards/language-testing-standards.md`** + - Canonical testing standards for Rust and Julia + - Versioned copy: `language-testing-standards-v1.0.0-2024-04-14.md` + - Rust toolchain documentation + - Julia equivalent tools guide + - Implementation roadmap + +2. **`standards/julia-testing-tools-guide.md`** + - JuliaFormatter.jl → rustfmt equivalent + - JET.jl → clippy equivalent + - Aqua.jl → cargo audit equivalent + - BenchmarkTools.jl → cargo bench equivalent + - Coverage.jl → tarpaulin equivalent + - Migration guide from Rust to Julia + - CI/CD integration examples + +3. **`docs/secure-coding-training.md`** + - Comprehensive training program + - Rust secure coding practices + - Julia secure coding practices + - CI/CD pipeline training + - Static analysis deep dive + - Hands-on exercises with solutions + - Certification program + - Resource library + +4. **`docs/quick-reference.md`** + - Rust commands cheat sheet + - Julia commands cheat sheet + - Tool equivalence table + - CI/CD pipeline reference + - Common issues and fixes + - Security checklists + - Emergency response guide + +## Files Created + +```bash +standards/ +├── language-testing-standards.md # Canonical standards (1.0.0) +├── language-testing-standards-v1.0.0-2024-04-14.md # Versioned copy +├── julia-testing-tools-guide.md # Julia tools guide +└── standards/ # Existing directory + +docs/ +├── secure-coding-training.md # Comprehensive training (13.6KB) +└── quick-reference.md # Quick reference guide (5.9KB) +``` + +**Total Documentation:** 24.2KB of new content + +## Key Findings + +### Rust Project Analysis +- **Already Gold Standard**: Existing implementation exceeds requirements +- **Comprehensive Tooling**: Clippy, Rustfmt, Cargo Audit, plus extras +- **Dual CI/CD**: Both GitHub Actions and GitLab CI integrated +- **Security Focus**: Dedicated security stages and regular audits +- **Best Practices**: Warnings as errors, format checking, unsafe code analysis + +### Julia Project Analysis +- **Not a Rust Project**: Julia language, so Rust tools don't apply +- **Current State**: Basic testing only, no static analysis +- **Recommendations**: JuliaFormatter, JET, Aqua integration needed +- **CI/CD Ready**: GitHub Actions template provided + +## Implementation Status + +### Rust (asdf-acceleration-middleware) +- ✅ Clippy: Integrated and configured +- ✅ Rustfmt: Integrated and configured +- ✅ Cargo Audit: Integrated and configured +- ✅ Regular Audits: Security stage in CI/CD +- ✅ Documentation: Comprehensive guides created +- ✅ Training: Materials provided + +### Julia (JuliaPackage-Reuse-Audit.jl) +- ✅ JuliaFormatter: Integrated in quality.yml +- ✅ JET.jl: Integrated in quality.yml +- ✅ Aqua.jl: Integrated in quality.yml +- ✅ Basic Testing: Pkg.test() working +- ✅ Documentation: Integration guides created +- ✅ Training: Materials provided +- ✅ Scheduled Audits: security-audit.yml (weekly) + +## Next Steps + +### Phase 1: Documentation (✅ COMPLETE) +- [x] Create canonical language standards +- [x] Document Rust implementation +- [x] Document Julia equivalent tools +- [x] Create training materials +- [x] Create quick reference guides + +### Phase 2: Julia Integration (✅ COMPLETED) +- [x] Add JuliaFormatter to JuliaPackage-Reuse-Audit.jl +- [x] Add JET.jl static analysis +- [x] Add Aqua.jl security checks +- [x] Update CI/CD pipelines +- [x] Set up scheduled security runs + +### Phase 3: Monitoring (📅 PLANNED) +- [ ] Create compliance dashboard +- [ ] Set up metrics tracking +- [ ] Establish audit scheduling +- [ ] Implement automated reporting + +## Training Program + +### Certification Path +1. **Level 1**: Tool usage and basic analysis + - Complete hands-on exercises + - Pass knowledge assessment + - Implement tools in personal project + +2. **Level 2**: CI/CD integration and automation + - Enhance existing pipelines + - Set up scheduled security runs + - Create custom lint configurations + +3. **Level 3**: Advanced analysis and mentorship + - Develop custom security tools + - Mentor other developers + - Contribute to security standards + +### Resources Provided +- **Rust Resources**: Clippy docs, Cargo Audit, RustSec +- **Julia Resources**: JuliaFormatter, JET, Aqua documentation +- **General Resources**: OWASP Top 10, CWE Top 25, SANS guides +- **Internal Resources**: Standards repository, training materials + +## Maintenance Plan + +### Review Cycle +- **Quarterly**: Standards review and updates +- **Monthly**: Tool version updates +- **Weekly**: Security advisory reviews +- **Daily**: CI/CD monitoring + +### Responsibilities +- **Rust Team**: @hyperpolymath/rust-team +- **Julia Team**: @hyperpolymath/julia-team +- **DevOps Team**: @hyperpolymath/devops-team +- **Security Team**: @hyperpolymath/security-team + +## Success Metrics + +### Current State +- **Rust Coverage**: 100% of requirements met +- **Julia Coverage**: 100% (tools integrated and documented) +- **Documentation**: 100% complete +- **Training**: 100% materials created +- **Scheduled Audits**: 100% implemented (weekly) + +### Target Metrics +- **Julia Integration**: 100% by 2024-05-14 +- **Developer Adoption**: 100% by 2024-06-14 +- **CI/CD Compliance**: 100% by 2024-07-14 +- **Security Incident Reduction**: 50% by 2024-12-31 + +## Recommendations + +### Immediate Actions +1. **Julia Team**: Implement JuliaFormatter, JET, and Aqua in Julia projects +2. **DevOps Team**: Enhance Julia CI/CD pipelines with security checks +3. **Developers**: Complete Level 1 certification +4. **Maintainers**: Schedule quarterly standards review + +### Long-term Strategy +1. **Automation**: Implement automated security reporting +2. **Monitoring**: Set up compliance dashboard +3. **Training**: Conduct workshops and mentorship +4. **Community**: Encourage contributions to security standards + +## Conclusion + +**Task Status:** ✅ **FULLY COMPLETE** + +All requested tasks have been fulfilled: +1. ✅ Rust CI/CD integration confirmed (already implemented) +2. ✅ Regular audit processes documented and implemented +3. ✅ Comprehensive training materials created +4. ✅ Julia equivalent tools documented AND integrated +5. ✅ Canonical standards established and versioned +6. ✅ Scheduled security audits implemented (weekly) + +**Files Ready for Commit:** +```bash +cd /var/mnt/eclipse/repos/standards +git commit -m "Add security training and language testing standards" +``` + +**Next Review:** 2024-07-14 +**Maintainers:** @hyperpolymath/core-team +**Feedback:** Submit issues to standards repository \ No newline at end of file diff --git a/scripts/check-language-guide.sh b/scripts/check-language-guide.sh index 9a825a7a..5dac9c2b 100755 --- a/scripts/check-language-guide.sh +++ b/scripts/check-language-guide.sh @@ -3,13 +3,14 @@ # # check-language-guide.sh — structural lint for per-language testing guides. # -# Every guide built from templates/language-testing-guide-TEMPLATE.adoc MUST carry +# Every guide built from toolchain-readiness-grades/testing/language-testing-guide-TEMPLATE.adoc +# MUST carry # the required sections and the R1–R9 requirement-mapping table. A guide that # silently omits a section (e.g. "Known gaps") is a false-completeness hole — # this fails loudly instead. # # Usage: check-language-guide.sh [guide.adoc ...] -# With no args, checks every docs/*-testing-guide.adoc. +# With no args, checks every guide in toolchain-readiness-grades/testing/. # Exit: 0 all valid · 1 a guide is missing a required section set -uo pipefail @@ -42,11 +43,11 @@ check_one() { # file if [ "$#" -gt 0 ]; then files=("$@") else - mapfile -t files < <(find "$ROOT/docs" -maxdepth 1 -type f \( -name '*-testing-guide.adoc' -o -name '*-testing-guide.md' \) -print 2>/dev/null | LC_ALL=C sort) + mapfile -t files < <(find "$ROOT/toolchain-readiness-grades/testing" -maxdepth 1 -type f -name '*-testing-guide.adoc' -print 2>/dev/null | LC_ALL=C sort) fi if [ "${#files[@]}" -eq 0 ]; then - echo "no language testing guides found (docs/*-testing-guide.{adoc,md})"; exit 0 + echo "no language testing guides found (toolchain-readiness-grades/testing/*-testing-guide.adoc)"; exit 0 fi rc=0 diff --git a/scripts/tests/wave5-language-guides-test.sh b/scripts/tests/wave5-language-guides-test.sh index df6e7532..dc6f7014 100755 --- a/scripts/tests/wave5-language-guides-test.sh +++ b/scripts/tests/wave5-language-guides-test.sh @@ -20,7 +20,7 @@ if [ "$guide_rc" -eq 0 ] && printf '%s\n' "$guide_out" | grep -q 'affinescript-t else bad "estate guides were missed or failed lint" fi -bash "$CHK" "$ROOT/docs/affinescript-testing-guide.adoc" >/dev/null 2>&1 && ok "affinescript guide valid" || bad "affinescript guide invalid" +bash "$CHK" "$ROOT/toolchain-readiness-grades/testing/affinescript-testing-guide.adoc" >/dev/null 2>&1 && ok "affinescript guide valid" || bad "affinescript guide invalid" echo "== rejects incomplete guides ==" # missing a required section @@ -39,7 +39,7 @@ bash "$CHK" "$g3" >/dev/null 2>&1 && bad "missing R1..R9 not caught" || ok "miss echo "== the stale duplicate snapshot is gone ==" [ ! -f "$ROOT/docs/language-testing-standards-v1.0.0-2024-04-14.adoc" ] && ok "duplicate snapshot removed" || bad "duplicate snapshot still present" echo "== the standard is v2.0.0 with RFC-2119 ==" -grep -q 'Version:\* 2.0.0' "$ROOT/docs/language-testing-standards.adoc" && grep -qi 'RFC-2119' "$ROOT/docs/language-testing-standards.adoc" && ok "standard refreshed to v2.0.0 RFC-2119" || bad "standard not refreshed" +grep -q 'Version:\* 2.0.0' "$ROOT/toolchain-readiness-grades/testing/LANGUAGE-TESTING-STANDARDS.adoc" && grep -qi 'RFC-2119' "$ROOT/toolchain-readiness-grades/testing/LANGUAGE-TESTING-STANDARDS.adoc" && ok "standard refreshed to v2.0.0 RFC-2119" || bad "standard not refreshed" echo echo "Wave-5 language-guides regression: $pass passed, $fail failed" diff --git a/scripts/tests/wave9-session-detritus-test.sh b/scripts/tests/wave9-session-detritus-test.sh new file mode 100755 index 00000000..313639b2 --- /dev/null +++ b/scripts/tests/wave9-session-detritus-test.sh @@ -0,0 +1,75 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: MPL-2.0 +# Regression coverage for standards#496: session artefacts must be archived, +# while live testing guidance must remain inside a registry-listed spec home. +set -euo pipefail + +ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd) +pass=0 +fail=0 + +ok() { printf 'PASS: %s\n' "$1"; pass=$((pass + 1)); } +bad() { printf 'FAIL: %s\n' "$1" >&2; fail=$((fail + 1)); } + +assert_absent() { + if [ ! -e "$ROOT/$1" ]; then ok "$1 absent from live tree"; else bad "$1 remains live"; fi +} + +assert_present() { + if [ -f "$ROOT/$1" ]; then ok "$1 preserved in archive/canonical home"; else bad "$1 missing"; fi +} + +for retired in \ + stapeln.toml \ + contractile.just \ + audit-contractiles.sh \ + SECURITY_TRAINING_SUMMARY.md \ + axel-protocol/SONNET-TASKS.adoc \ + 0-ai-gatekeeper-protocol/AI-GATEKEEPER-PROTOCOL-COMPLETE-2026-02-07.adoc \ + automation/K9-AUTOMATION-SPEC.a2ml \ + interop/CRG-TRG-RSR-MAPPING.a2ml \ + templates/TEMPLATE-VERSIONING-SPEC.a2ml \ + docs/language-testing-standards.adoc \ + docs/affinescript-testing-guide.adoc \ + docs/julia-testing-tools-guide.adoc \ + templates/language-testing-guide-TEMPLATE.adoc; do + assert_absent "$retired" +done + +for preserved in \ + docs/archive/scaffolding/stapeln.toml \ + docs/archive/scaffolding/contractile.just \ + docs/archive/scaffolding/audit-contractiles.sh \ + docs/archive/session-detritus/root/SECURITY_TRAINING_SUMMARY.md \ + docs/archive/session-detritus/axel-protocol/SONNET-TASKS.adoc \ + docs/archive/session-detritus/0-ai-gatekeeper-protocol/AI-GATEKEEPER-PROTOCOL-COMPLETE-2026-02-07.adoc \ + docs/archive/reorg-leftovers/K9-AUTOMATION-SPEC.a2ml \ + docs/archive/reorg-leftovers/CRG-TRG-RSR-MAPPING.a2ml \ + docs/archive/reorg-leftovers/TEMPLATE-VERSIONING-SPEC.a2ml \ + toolchain-readiness-grades/testing/LANGUAGE-TESTING-STANDARDS.adoc \ + toolchain-readiness-grades/testing/affinescript-testing-guide.adoc \ + toolchain-readiness-grades/testing/julia-testing-tools-guide.adoc \ + toolchain-readiness-grades/testing/language-testing-guide-TEMPLATE.adoc; do + assert_present "$preserved" +done + +if ! rg -q '^import\? "contractile\.just"' "$ROOT/Justfile"; then + ok 'Justfile does not import retired generated output' +else + bad 'Justfile imports retired generated output' +fi + +if rg -q 'just setup-dev|just panic-scan' "$ROOT/QUICKSTART-DEV.adoc"; then + bad 'developer quickstart retains unavailable recipes' +else + ok 'developer quickstart names available recipes' +fi + +if rg -q 'ZIGZAG-TESTING\.md' "$ROOT/TEST-NEEDS.adoc"; then + bad 'TEST-NEEDS retains dangling Markdown link' +else + ok 'TEST-NEEDS uses the existing AsciiDoc target' +fi + +printf '\n%d passed, %d failed\n' "$pass" "$fail" +[ "$fail" -eq 0 ] diff --git a/toolchain-readiness-grades/README.adoc b/toolchain-readiness-grades/README.adoc index 391c68ae..a2dc54ac 100644 --- a/toolchain-readiness-grades/README.adoc +++ b/toolchain-readiness-grades/README.adoc @@ -67,6 +67,12 @@ Three reasons: minimums), `templates/A-GRADE-LLM-PANEL.adoc` (the 6+6 panel composition rules). +| `testing/` | The estate-wide language-testing + standard, its AffineScript and Julia + guides, and the per-language guide + template. These belong with toolchain + readiness rather than an unregistered + root-level reorganisation directory. | `SELF-ASSESSMENT.adoc` | TRG applied to itself. Honest current grade: *X* (untested). The standard has been written diff --git a/docs/language-testing-standards.adoc b/toolchain-readiness-grades/testing/LANGUAGE-TESTING-STANDARDS.adoc similarity index 95% rename from docs/language-testing-standards.adoc rename to toolchain-readiness-grades/testing/LANGUAGE-TESTING-STANDARDS.adoc index ec0d0f08..67f89bd4 100644 --- a/docs/language-testing-standards.adoc +++ b/toolchain-readiness-grades/testing/LANGUAGE-TESTING-STANDARDS.adoc @@ -9,7 +9,7 @@ policy. Keywords *MUST / SHOULD / MAY* are RFC-2119. It sits above the per-language guides: this document says _what every language’s testing story MUST provide_; each per-language guide (built -from `+templates/language-testing-guide-TEMPLATE.md+`) says _which +from `+toolchain-readiness-grades/testing/language-testing-guide-TEMPLATE.adoc+`) says _which concrete tools provide it_. The requirement categories align with the CRG test taxonomy in `+testing-and-benchmarking/TESTING-TAXONOMY.adoc+`, so a language’s testing maturity maps onto its Component/Toolchain @@ -220,7 +220,7 @@ demonstrated — harness correct *and* wrongness verifiably rejected. === Per-language guides (required set) Each approved language SHOULD publish a guide from -`+templates/language-testing-guide-TEMPLATE.md+`. Priority tracks estate +`+toolchain-readiness-grades/testing/language-testing-guide-TEMPLATE.adoc+`. Priority tracks estate centrality: [width="100%",cols="34%,33%,33%",options="header",] @@ -228,10 +228,10 @@ centrality: |Language |Guide |Status |Rust/SPARK |this document §Rust + SPARK proof gate |present -|Julia |`+julia-testing-tools-guide.md+` |present (v1.0.0 — R1–R9 +|Julia |`+julia-testing-tools-guide.adoc+` |present (v1.0.0 — R1–R9 refresh tracked) -|*AffineScript* |`+affinescript-testing-guide.md+` |*present* — +|*AffineScript* |`+affinescript-testing-guide.adoc+` |*present* — canonical SSOT migrates to `+hyperpolymath/affinescript+` prospectively |Zig |— |charter @@ -273,7 +273,7 @@ Reusable workflow: `+rust-ci-reusable.yml+`. Warnings are errors === Julia -Concrete tools live in `+julia-testing-tools-guide.md+`. Requirement +Concrete tools live in `+julia-testing-tools-guide.adoc+`. Requirement mapping: [width="100%",cols="50%,50%",options="header",] @@ -302,7 +302,7 @@ ____ === AffineScript The estate’s primary application language. See -`+affinescript-testing-guide.md+` for the full guide; requirement +`+affinescript-testing-guide.adoc+` for the full guide; requirement mapping summarised there. Canonical SSOT will move to `+hyperpolymath/affinescript+` prospectively (charter) — until then this repo carries the guide. @@ -324,7 +324,7 @@ applied to CI gates: four tiers, machine-checkable invariants, and drift signals. Its "`every gate must have failed at least once, or be annotated `+cannot-fail-by-design+``" invariant is R10.3/R10.5 at the pipeline level. -* `+templates/language-testing-guide-TEMPLATE.md+` — the per-language +* `+toolchain-readiness-grades/testing/language-testing-guide-TEMPLATE.adoc+` — the per-language skeleton. * `+component-readiness-grades/+` · `+toolchain-readiness-grades/+` — testing → grade. diff --git a/docs/affinescript-testing-guide.adoc b/toolchain-readiness-grades/testing/affinescript-testing-guide.adoc similarity index 96% rename from docs/affinescript-testing-guide.adoc rename to toolchain-readiness-grades/testing/affinescript-testing-guide.adoc index 9ef70125..20925433 100644 --- a/docs/affinescript-testing-guide.adoc +++ b/toolchain-readiness-grades/testing/affinescript-testing-guide.adoc @@ -3,7 +3,7 @@ == AffineScript Testing Tools Guide *Version:* 1.0.0 *Date:* 2026-07-03 *Status:* Active (baseline — honest -by construction) *Parent standard:* `+language-testing-standards.md+` +by construction) *Parent standard:* `+LANGUAGE-TESTING-STANDARDS.adoc+` (R1–R9) AffineScript is the estate’s primary application language (RS/TS/JS → @@ -132,10 +132,10 @@ this guide exists. === Resources -* `+language-testing-standards.md+` — the parent R1–R9 standard. +* `+LANGUAGE-TESTING-STANDARDS.adoc+` — the parent R1–R9 standard. * `+.github/workflows/affinescript-verify.yml+` — the current (advisory) CI check. -* `+templates/language-testing-guide-TEMPLATE.md+` — the skeleton this +* `+language-testing-guide-TEMPLATE.adoc+` — the skeleton this follows. * SSOT (prospective): `+hyperpolymath/affinescript+`. diff --git a/docs/julia-testing-tools-guide.adoc b/toolchain-readiness-grades/testing/julia-testing-tools-guide.adoc similarity index 100% rename from docs/julia-testing-tools-guide.adoc rename to toolchain-readiness-grades/testing/julia-testing-tools-guide.adoc diff --git a/templates/language-testing-guide-TEMPLATE.adoc b/toolchain-readiness-grades/testing/language-testing-guide-TEMPLATE.adoc similarity index 94% rename from templates/language-testing-guide-TEMPLATE.adoc rename to toolchain-readiness-grades/testing/language-testing-guide-TEMPLATE.adoc index 3723ffd3..b324e248 100644 --- a/templates/language-testing-guide-TEMPLATE.adoc +++ b/toolchain-readiness-grades/testing/language-testing-guide-TEMPLATE.adoc @@ -1,14 +1,14 @@ == Testing Tools Guide *Version:* 1.0.0 *Date:* *Status:* *Parent standard:* -`+language-testing-standards.md+` (R1–R9) +`+LANGUAGE-TESTING-STANDARDS.adoc+` (R1–R9) One-paragraph purpose: what this guide covers and who maintains it. === Requirement mapping The single most important table: map each requirement from -`+language-testing-standards.md+` to a CONCRETE, CI-runnable tool, or +`+LANGUAGE-TESTING-STANDARDS.adoc+` to a CONCRETE, CI-runnable tool, or the literal `+none+` (visible, never a silent gap). A `+none+` on a MUST row is a real gap.