diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index d45e019e..58893e8d 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -18,12 +18,9 @@ The same discipline applies to `hyperpolymath/januskey` and its `reversible-core The following files in `.machine_readable/` contain structured project metadata: - `.machine_readable/ECHO_TYPES_OCHRANCE_BRIDGE.a2ml` - Bridge to echo-types + ochrance (READ FIRST) -- `.machine_readable/6a2/STATE.a2ml` - Current project state and progress -- `.machine_readable/6a2/META.a2ml` - Architecture decisions and development practices -- `.machine_readable/6a2/ECOSYSTEM.a2ml` - Position in the ecosystem and related projects -- `.machine_readable/6a2/AGENTIC.a2ml` - AI agent interaction patterns -- `.machine_readable/6a2/NEUROSYM.a2ml` - Neurosymbolic integration config -- `.machine_readable/6a2/PLAYBOOK.a2ml` - Operational runbook +- `valence-shell_chora.deed` (repo root) - The repo deed: identity, canon pin, and the descriptile clauses `(ecosystem …)`, `(agentic …)`, `(neurosym …)` and `(playbook …)`. A2ML is retired (D99, D269c, D312, D313) +- `archive/a2ml-v1/MIGRATION-LEDGER.adoc` - Where each field of the retired descriptiles went, and the items awaiting owner input +- `archive/a2ml-v1/6a2-*.txt` - The retired STATE, META, ECOSYSTEM, AGENTIC, NEUROSYM, PLAYBOOK and ANCHOR files, archived verbatim --- @@ -45,7 +42,7 @@ The following files in `.machine_readable/` contain structured project metadata: | **JavaScript** | Only where AffineScript cannot | MCP protocol glue, Bun APIs | | **Python** | SaltStack only | No other Python permitted | | **Nickel** | Configuration language | For complex configs | -| **Guile Scheme** | State/meta files | .machine_readable/6a2/STATE.a2ml, .machine_readable/6a2/META.a2ml, .machine_readable/6a2/ECOSYSTEM.a2ml | +| **Guile Scheme** | Scripting where needed | (metadata is `valence-shell_chora.deed`; see Machine-Readable Artefacts) | | **Julia** | Batch scripts, data processing | Per RSR | | **OCaml** | AffineScript compiler | Language-specific | | **Ada** | Safety-critical systems | Where required | diff --git a/.github/workflows/hypatia-scan.yml b/.github/workflows/hypatia-scan.yml index 31da23c2..aedcd5df 100644 --- a/.github/workflows/hypatia-scan.yml +++ b/.github/workflows/hypatia-scan.yml @@ -47,15 +47,31 @@ jobs: timeout-minutes: 30 steps: - # Hypatia RE001: the scan job holds GITHUB_TOKEN and the fleet PAT next - # to fetched code (the Hypatia and gitbot-fleet clones, the mix build). - # Audit mode records every outbound connection without blocking; the - # job's endpoints (hex.pm, GitHub, the Elixir builds) are too many to - # enumerate safely as a block list here. - - name: Monitor outbound requests (audit) + # Hypatia RE001/RE002: the scan job holds GITHUB_TOKEN and the fleet PAT + # next to fetched code (the Hypatia and gitbot-fleet clones, the mix + # build), so outbound traffic is blocked except for the hosts it needs: + # GitHub (checkout, clones, API, SARIF upload, PR comment), the BEAM and + # Hex builds setup-beam and mix fetch, Actions artifact storage, and the + # Green Web Foundation API one Hypatia rule queries. If a run reports a + # blocked endpoint, add it here deliberately. + - name: Restrict outbound requests to the scan's known hosts uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4 with: - egress-policy: audit + egress-policy: block + allowed-endpoints: >- + github.com:443 + api.github.com:443 + codeload.github.com:443 + objects.githubusercontent.com:443 + release-assets.githubusercontent.com:443 + raw.githubusercontent.com:443 + uploads.github.com:443 + builds.hex.pm:443 + repo.hex.pm:443 + hex.pm:443 + results-receiver.actions.githubusercontent.com:443 + *.blob.core.windows.net:443 + api.thegreenwebfoundation.org:443 - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6.0.2 diff --git a/.github/workflows/workflow-linter.yml b/.github/workflows/workflow-linter.yml index 67b6a824..ae22f35a 100644 --- a/.github/workflows/workflow-linter.yml +++ b/.github/workflows/workflow-linter.yml @@ -20,12 +20,19 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v4 - name: Check SPDX headers + # The identifier must be in the file's LEADING comment block, not on + # line 1 exactly: this is the predicate of the estate governance check + # (metadatastician/standards governance-reusable.yml, tested by + # scripts/tests/spdx-header-block-test.sh). `gh actions-lock` inserts + # a "managed by" comment at line 1, so a line-1 test fails headers + # that are present. run: | errors=0 for f in .github/workflows/*.yml .github/workflows/*.yaml; do [ -f "$f" ] || continue - if ! head -1 "$f" | grep -q "SPDX-License-Identifier"; then - echo "ERROR: $f missing SPDX header" + if ! awk '/^---[[:space:]]*$/ { next } /^#/ { print; next } { exit }' "$f" \ + | grep -q "^# SPDX-License-Identifier:"; then + echo "ERROR: $f has no SPDX-License-Identifier in its leading comment block" >&2 errors=$((errors + 1)) fi done diff --git a/.machine_readable/bot_directives/README.adoc b/.machine_readable/bot_directives/README.adoc index 5e42adbd..07cfff53 100644 --- a/.machine_readable/bot_directives/README.adoc +++ b/.machine_readable/bot_directives/README.adoc @@ -32,7 +32,8 @@ Methodology-aware configuration for AI agents. Read by any AI agent == Relationship to Other Files -* `AGENTIC.a2ml` says WHAT agents can do (permissions, gating) +* The `(agentic …)` clause of `valence-shell_chora.deed` (formerly + `AGENTIC.a2ml`) says WHAT agents can do (permissions, gating) * `bot_directives/` says HOW agents should work (methodology) * `bot_directives/` says what the gitbot-fleet does (fleet-specific) * `CLAUDE.md` says how Claude specifically should work (Claude-specific) diff --git a/.machine_readable/contractiles/Mustfile.a2ml b/.machine_readable/contractiles/Mustfile.a2ml index 55f8ab48..3473b8ca 100644 --- a/.machine_readable/contractiles/Mustfile.a2ml +++ b/.machine_readable/contractiles/Mustfile.a2ml @@ -61,16 +61,11 @@ hooks fail if any check fails. - run: test -f .machine_readable/contractiles/bust/Bustfile.a2ml && test -f .machine_readable/contractiles/dust/Dustfile.a2ml - severity: critical -### six-directory-present -- description: 6a2 directory exists with required files -- run: test -d .machine_readable/6a2 && test -f .machine_readable/6a2/META.a2ml && test -f .machine_readable/6a2/ECOSYSTEM.a2ml && test -f .machine_readable/6a2/STATE.a2ml && test -f .machine_readable/6a2/PLAYBOOK.a2ml && test -f .machine_readable/6a2/AGENTIC.a2ml && test -f .machine_readable/6a2/NEUROSYM.a2ml +### repo-deed-present +- description: The repo deed holds the descriptiles; the retired 6a2 A2ML files are archived (D312, D313) +- run: test -f valence-shell_chora.deed && test -f archive/a2ml-v1/MIGRATION-LEDGER.adoc && test ! -e .machine_readable/6a2 && for f in STATE.a2ml META.a2ml ECOSYSTEM.a2ml AGENTIC.a2ml NEUROSYM.a2ml PLAYBOOK.a2ml 0-AI-MANIFEST.a2ml anchor-ANCHOR.a2ml README.adoc; do test -f "archive/a2ml-v1/6a2-$f.txt" || exit 1; done - severity: critical -### anchors-directory -- description: anchors directory exists in 6a2 -- run: test -d .machine_readable/6a2/anchors -- severity: warning - ### self-validating-structure - description: self-validating directory has k9-svc and examples - run: test -d .machine_readable/self-validating && test -d .machine_readable/self-validating/k9-svc && test -d .machine_readable/self-validating/examples diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index de48c3d5..0a23481a 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -11,6 +11,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 == [Unreleased] +=== Changed — 2026-11-17 (A2ML descriptiles moved into the repo deed) + +- The retired `.machine_readable/6a2/` A2ML files (STATE, META, ECOSYSTEM, + AGENTIC, NEUROSYM, PLAYBOOK, the directory manifest, the anchor and the + directory README) are archived verbatim under `archive/a2ml-v1/` with their + history. Their content now lives in `valence-shell_chora.deed`, a + `repo-deed` that passes the standards `deed_lint`. Fields with no mapping row + are kept as comments, and every field's disposition, including the items + that need owner input, is in `archive/a2ml-v1/MIGRATION-LEDGER.adoc`. + Addresses Hypatia SD004; SD007 stays open on one owner-policy line of + `.claude/CLAUDE.md` (ledger row U-2). + === Changed — 2026-11-01 (assurance-boundary re-audit) - Corrected prose that had drifted across the assurance boundary. The audit diff --git a/ROADMAP.adoc b/ROADMAP.adoc index a708b790..8946a61f 100644 --- a/ROADMAP.adoc +++ b/ROADMAP.adoc @@ -5,8 +5,8 @@ == Current Status -v0.9.0 (advanced research prototype, ~74% complete per -`.machine_readable/6a2/STATE.a2ml`). +v0.9.0 (advanced research prototype, ~74% complete per the retired +`STATE.a2ml`, archived at `archive/a2ml-v1/6a2-STATE.a2ml.txt`). The Rust CLI in `impl/rust-cli/` is a functional interactive shell with reversible filesystem operations, transaction grouping, and @@ -39,11 +39,16 @@ CI on `rust-cli.yml`, dogfood evidence, structural compliance. in the same PR. * [ ] Per-directory README coverage 23% → ~90% (17 subtrees missing, enumerated in the audit). -* [ ] Add `[dogfooding-status]` to STATE.a2ml with concrete daily-use - entries. -* [ ] Add 3+ ADRs to META.a2ml (proof stack: Agda source, Lean/Rocq rechecks, Rust as primary +* [ ] Record dogfooding status with concrete daily-use entries. + _Target pending:_ this item named `STATE.a2ml`, which is retired and + archived (2026-11-17). Do not edit the archive; the new home is an + owner decision (`archive/a2ml-v1/MIGRATION-LEDGER.adoc`, row U-6). +* [ ] Write 3+ ADRs (proof stack: Agda source, Lean/Rocq rechecks, Rust as primary implementation, property-testing as correspondence-gap mitigation) and - populate `[development-practices]`. + record the development practices. + _Target pending:_ this item named `META.a2ml`, which is retired and + archived. The canon's successor is `(adr …)` entries in the deed + (ledger rows U-6 and T-1); do not edit the archive. * [x] Resolved 2026-04-19: `impl/rust-ffi/` deleted; `ffi/rust/` is canonical (superset, includes `verification.rs`, matches CLAUDE.md ABI/FFI standard `ffi//`). 7 sibling files were byte-identical; diff --git a/alkahest-shell-transmuter/.github/workflows/codeql.yml b/alkahest-shell-transmuter/.github/workflows/codeql.yml index 55d4f909..73d1fcb0 100644 --- a/alkahest-shell-transmuter/.github/workflows/codeql.yml +++ b/alkahest-shell-transmuter/.github/workflows/codeql.yml @@ -38,7 +38,7 @@ jobs: - name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Initialize CodeQL - uses: github/codeql-action/init@ea9e4e37992a54ee68a9571571f9a567d8f90f78 # v3.28.0 + uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0 with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} @@ -53,6 +53,6 @@ jobs: # Java: ./gradlew build || mvn compile echo "Configure your build command above for manual build mode languages" - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ea9e4e37992a54ee68a9571571f9a567d8f90f78 # v3.28.0 + uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0 with: category: "/language:${{ matrix.language }}" diff --git a/alkahest-shell-transmuter/.github/workflows/mirror.yml b/alkahest-shell-transmuter/.github/workflows/mirror.yml index 98c185d9..d7102959 100644 --- a/alkahest-shell-transmuter/.github/workflows/mirror.yml +++ b/alkahest-shell-transmuter/.github/workflows/mirror.yml @@ -1,115 +1,25 @@ # SPDX-License-Identifier: MPL-2.0 -# SPDX-FileCopyrightText: 2025 Jonathan D.A. Jewell name: Mirror to Git Forges + on: push: branches: [main] workflow_dispatch: -permissions: read-all + +permissions: + actions: read + contents: read + jobs: - mirror-gitlab: - runs-on: ubuntu-latest - if: vars.GITLAB_MIRROR_ENABLED == 'true' - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - with: - fetch-depth: 0 - - uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0 - with: - ssh-private-key: ${{ secrets.GITLAB_SSH_KEY }} - - name: Mirror to GitLab - run: | - ssh-keyscan -t ed25519 gitlab.com >> ~/.ssh/known_hosts - git remote add gitlab git@gitlab.com:hyperpolymath/${{ github.event.repository.name }}.git || true - git push --force gitlab main - mirror-bitbucket: - runs-on: ubuntu-latest - if: vars.BITBUCKET_MIRROR_ENABLED == 'true' - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - with: - fetch-depth: 0 - - uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0 - with: - ssh-private-key: ${{ secrets.BITBUCKET_SSH_KEY }} - - name: Mirror to Bitbucket - run: | - ssh-keyscan -t ed25519 bitbucket.org >> ~/.ssh/known_hosts - git remote add bitbucket git@bitbucket.org:hyperpolymath/${{ github.event.repository.name }}.git || true - git push --force bitbucket main - mirror-codeberg: - runs-on: ubuntu-latest - if: vars.CODEBERG_MIRROR_ENABLED == 'true' - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - with: - fetch-depth: 0 - - uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0 - with: - ssh-private-key: ${{ secrets.CODEBERG_SSH_KEY }} - - name: Mirror to Codeberg - run: | - ssh-keyscan -t ed25519 codeberg.org >> ~/.ssh/known_hosts - git remote add codeberg git@codeberg.org:hyperpolymath/${{ github.event.repository.name }}.git || true - git push --force codeberg main - mirror-sourcehut: - runs-on: ubuntu-latest - if: vars.SOURCEHUT_MIRROR_ENABLED == 'true' - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - with: - fetch-depth: 0 - - uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0 - with: - ssh-private-key: ${{ secrets.SOURCEHUT_SSH_KEY }} - - name: Mirror to SourceHut - run: | - ssh-keyscan -t ed25519 git.sr.ht >> ~/.ssh/known_hosts - git remote add sourcehut git@git.sr.ht:~hyperpolymath/${{ github.event.repository.name }} || true - git push --force sourcehut main - mirror-disroot: - runs-on: ubuntu-latest - if: vars.DISROOT_MIRROR_ENABLED == 'true' - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - with: - fetch-depth: 0 - - uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0 - with: - ssh-private-key: ${{ secrets.DISROOT_SSH_KEY }} - - name: Mirror to Disroot - run: | - ssh-keyscan -t ed25519 git.disroot.org >> ~/.ssh/known_hosts - git remote add disroot git@git.disroot.org:hyperpolymath/${{ github.event.repository.name }}.git || true - git push --force disroot main - mirror-gitea: - runs-on: ubuntu-latest - if: vars.GITEA_MIRROR_ENABLED == 'true' - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - with: - fetch-depth: 0 - - uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0 - with: - ssh-private-key: ${{ secrets.GITEA_SSH_KEY }} - - name: Mirror to Gitea - run: | - ssh-keyscan -t ed25519 ${{ vars.GITEA_HOST }} >> ~/.ssh/known_hosts - git remote add gitea git@${{ vars.GITEA_HOST }}:hyperpolymath/${{ github.event.repository.name }}.git || true - git push --force gitea main - mirror-radicle: - runs-on: ubuntu-latest - if: vars.RADICLE_MIRROR_ENABLED == 'true' - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - with: - fetch-depth: 0 - - name: Install Radicle - run: | - curl -sSf https://radicle.xyz/install | sh - echo "$HOME/.radicle/bin" >> $GITHUB_PATH - - name: Mirror to Radicle - run: | - echo "${{ secrets.RADICLE_KEY }}" > ~/.radicle/keys/radicle - chmod 600 ~/.radicle/keys/radicle - rad sync --announce || echo "Radicle sync attempted" + mirror: + uses: metadatastician/standards/.github/workflows/mirror-reusable.yml@75bd5994470661a099df562d6d5ad2fe744dbd66 + # Explicit secrets map, not `secrets: inherit` (Hypatia WH008): the callee + # (standards@75bd5994) declares exactly these seven, all optional. + secrets: + GITLAB_SSH_KEY: ${{ secrets.GITLAB_SSH_KEY }} + BITBUCKET_SSH_KEY: ${{ secrets.BITBUCKET_SSH_KEY }} + CODEBERG_SSH_KEY: ${{ secrets.CODEBERG_SSH_KEY }} + SOURCEHUT_SSH_KEY: ${{ secrets.SOURCEHUT_SSH_KEY }} + DISROOT_SSH_KEY: ${{ secrets.DISROOT_SSH_KEY }} + GITEA_SSH_KEY: ${{ secrets.GITEA_SSH_KEY }} + RADICLE_KEY: ${{ secrets.RADICLE_KEY }} diff --git a/alkahest-shell-transmuter/.github/workflows/secret-scanner.yml b/alkahest-shell-transmuter/.github/workflows/secret-scanner.yml index 0899a46e..c3027f7a 100644 --- a/alkahest-shell-transmuter/.github/workflows/secret-scanner.yml +++ b/alkahest-shell-transmuter/.github/workflows/secret-scanner.yml @@ -1,49 +1,20 @@ # SPDX-License-Identifier: MPL-2.0 -# Prevention workflow - scans for hardcoded secrets before they reach main name: Secret Scanner + on: pull_request: push: branches: [main] -permissions: read-all -jobs: - trufflehog: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - with: - fetch-depth: 0 # Full history for scanning - - name: TruffleHog Secret Scan - uses: trufflesecurity/trufflehog@8a8ef8526528d8a4ff3e2c90be08e25ef8efbd9b # v3 - with: - extra_args: --only-verified --fail - # Rust-specific: Check for hardcoded crypto values - rust-secrets: - runs-on: ubuntu-latest - if: hashFiles('**/Cargo.toml') != '' - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - - name: Check for hardcoded secrets in Rust - run: | - # Patterns that suggest hardcoded secrets - PATTERNS=( - 'const.*SECRET.*=.*"' - 'const.*KEY.*=.*"[a-zA-Z0-9]{16,}"' - 'const.*TOKEN.*=.*"' - 'let.*api_key.*=.*"' - 'HMAC.*"[a-fA-F0-9]{32,}"' - 'password.*=.*"[^"]+"' - ) - found=0 - for pattern in "${PATTERNS[@]}"; do - if grep -rn --include="*.rs" -E "$pattern" src/; then - echo "WARNING: Potential hardcoded secret found matching: $pattern" - found=1 - fi - done +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true - if [ $found -eq 1 ]; then - echo "::error::Potential hardcoded secrets detected. Use environment variables instead." - exit 1 - fi +permissions: + contents: read + +jobs: + scan: + permissions: + contents: read + uses: metadatastician/standards/.github/workflows/secret-scanner-reusable.yml@75bd5994470661a099df562d6d5ad2fe744dbd66 diff --git a/.machine_readable/6a2/0-AI-MANIFEST.a2ml b/archive/a2ml-v1/6a2-0-AI-MANIFEST.a2ml.txt similarity index 100% rename from .machine_readable/6a2/0-AI-MANIFEST.a2ml rename to archive/a2ml-v1/6a2-0-AI-MANIFEST.a2ml.txt diff --git a/.machine_readable/6a2/AGENTIC.a2ml b/archive/a2ml-v1/6a2-AGENTIC.a2ml.txt similarity index 100% rename from .machine_readable/6a2/AGENTIC.a2ml rename to archive/a2ml-v1/6a2-AGENTIC.a2ml.txt diff --git a/.machine_readable/6a2/ECOSYSTEM.a2ml b/archive/a2ml-v1/6a2-ECOSYSTEM.a2ml.txt similarity index 100% rename from .machine_readable/6a2/ECOSYSTEM.a2ml rename to archive/a2ml-v1/6a2-ECOSYSTEM.a2ml.txt diff --git a/.machine_readable/6a2/META.a2ml b/archive/a2ml-v1/6a2-META.a2ml.txt similarity index 100% rename from .machine_readable/6a2/META.a2ml rename to archive/a2ml-v1/6a2-META.a2ml.txt diff --git a/.machine_readable/6a2/NEUROSYM.a2ml b/archive/a2ml-v1/6a2-NEUROSYM.a2ml.txt similarity index 100% rename from .machine_readable/6a2/NEUROSYM.a2ml rename to archive/a2ml-v1/6a2-NEUROSYM.a2ml.txt diff --git a/.machine_readable/6a2/PLAYBOOK.a2ml b/archive/a2ml-v1/6a2-PLAYBOOK.a2ml.txt similarity index 100% rename from .machine_readable/6a2/PLAYBOOK.a2ml rename to archive/a2ml-v1/6a2-PLAYBOOK.a2ml.txt diff --git a/.machine_readable/6a2/README.adoc b/archive/a2ml-v1/6a2-README.adoc.txt similarity index 100% rename from .machine_readable/6a2/README.adoc rename to archive/a2ml-v1/6a2-README.adoc.txt diff --git a/.machine_readable/6a2/STATE.a2ml b/archive/a2ml-v1/6a2-STATE.a2ml.txt similarity index 100% rename from .machine_readable/6a2/STATE.a2ml rename to archive/a2ml-v1/6a2-STATE.a2ml.txt diff --git a/.machine_readable/6a2/anchor/ANCHOR.a2ml b/archive/a2ml-v1/6a2-anchor-ANCHOR.a2ml.txt similarity index 100% rename from .machine_readable/6a2/anchor/ANCHOR.a2ml rename to archive/a2ml-v1/6a2-anchor-ANCHOR.a2ml.txt diff --git a/archive/a2ml-v1/MIGRATION-LEDGER.adoc b/archive/a2ml-v1/MIGRATION-LEDGER.adoc new file mode 100644 index 00000000..b71b3322 --- /dev/null +++ b/archive/a2ml-v1/MIGRATION-LEDGER.adoc @@ -0,0 +1,240 @@ +// SPDX-License-Identifier: CC-BY-SA-4.0 += Migration ledger: `.machine_readable/6a2/` A2ML to the repo deed (valence-shell, 2026-11-17) +:toc: + +This ledger records every field of the retired `.machine_readable/6a2/` files: +where it went, why it did not move, or what the owner must supply. Row IDs match +the comments in `valence-shell_chora.deed`. + +Why now: Hypatia reported SD004 on the six `.machine_readable/6a2/*.a2ml` +descriptiles ("descriptile in retired location; the current canon keeps +descriptiles as clauses of the repo deed") and SD007 on `.claude/CLAUDE.md`, +which named `.machine_readable/6a2/`. A2ML is retired (D99, D269c, D312, D313). + +Authorities, all read on 2026-11-17: + +* `metadatastician/standards` at `151276d6`: `1-formats/deed/spec/abnf/deed.abnf` + (v2.0.0), `1-formats/deed/tools/README.adoc`, the mapping specs in + `1-formats/deed/mappings/` (`meta-ecosystem-to-repo-deed`, + `agentic-neurosym-playbook-to-repo-deed`, `state-v1-decision` (option B), + `ai-manifest-decision` (option A), `clade-to-repo-deed`, `README`), + `canon.lock`, `2-protocols/chora/CHORA-SPEC.adoc` (sections 9 and 11.1) and + `docs/estate-reconciliation/A7-contractiles-descriptiles-anchor.adoc` + (section 6.4, the anchor table). +* Precedent: `hyperpolymath/absolute-zero` at `8a3162a`, + `absolute-zero_chora.deed` and `archive/a2ml-v1/MIGRATION-LEDGER.adoc`. +* Registry: `hyperpolymath/gv-clade-index` at `09ef2838`, + `verisim/seed/chora-registry_praxis.deed`. + +== Archive map + +The nine files were moved with `git mv`, so their history is kept. The +`.machine_readable/6a2/` directory no longer exists. + +[cols="3,3",options="header"] +|=== +| Source (before) | Archived as +| `.machine_readable/6a2/STATE.a2ml` | `6a2-STATE.a2ml.txt` +| `.machine_readable/6a2/META.a2ml` | `6a2-META.a2ml.txt` +| `.machine_readable/6a2/ECOSYSTEM.a2ml` | `6a2-ECOSYSTEM.a2ml.txt` +| `.machine_readable/6a2/AGENTIC.a2ml` | `6a2-AGENTIC.a2ml.txt` +| `.machine_readable/6a2/NEUROSYM.a2ml` | `6a2-NEUROSYM.a2ml.txt` +| `.machine_readable/6a2/PLAYBOOK.a2ml` | `6a2-PLAYBOOK.a2ml.txt` +| `.machine_readable/6a2/0-AI-MANIFEST.a2ml` | `6a2-0-AI-MANIFEST.a2ml.txt` +| `.machine_readable/6a2/anchor/ANCHOR.a2ml` | `6a2-anchor-ANCHOR.a2ml.txt` +| `.machine_readable/6a2/README.adoc` | `6a2-README.adoc.txt` +|=== + +The archived files are byte-identical to their sources. Two of them, +`6a2-0-AI-MANIFEST.a2ml.txt` and `6a2-anchor-ANCHOR.a2ml.txt`, carried no SPDX +header in the source and still carry none: a header was not added, because an +archive is verbatim and an SPDX edit is the owner's (owner input, row X-1). + +== Where each file went + +[cols="2,4",options="header"] +|=== +| Source | Destination +| META | Nothing emitted; every key fails closed (M-1 to M-5). Kept as deed comments. +| ECOSYSTEM | `(ecosystem :project :ecosystem :position-type)` in the deed; the rest as comments (E-1 to E-5). +| AGENTIC | `(agentic :version :last-updated (permissions …))` in the deed; constraints and bridge rules as comments (A-1 to A-4). +| NEUROSYM | `(neurosym :version :last-updated (hypatia …))` in the deed (N-1, N-2). +| PLAYBOOK | `(playbook :version :last-updated (deployment) (incident-response) (release-process))`; commented content kept as comments (P-1 to P-4). +| STATE | Option B: nothing emitted; journal archived (S-1 to S-9). +| 6a2/0-AI-MANIFEST | Archived only (G-1). +| 6a2/README | Archived only (R-1). +| anchor/ANCHOR | No `(anchor …)` clause yet; fields recorded as comments with their A7 6.4 destinations (AN-1 to AN-7). +|=== + +== Ledger rows + +=== Target form + +[cols="1,3,4",options="header"] +|=== +| ID | Item | Disposition +| T-1 | Clause form vs the A7 split form | The descriptiles are clauses of `valence-shell_chora.deed`, as the absolute-zero precedent and Hypatia SD004 name them. The *more elegant long-term option*, and the current mapping specs' stated target, is the A7 split: `.machine_readable/descriptiles/{META,ECOSYSTEM,AGENTIC,NEUROSYM}.deed` (`descriptile-deed`, J30, J33, J35), with `(playbook …)` staying in the chora deed. This change departs from it because (a) A7 is a draft and its profiles gate only their own fixtures; (b) every `descriptile-deed` requires `:affirmed` and `:affirmed-by` (J4), an affirmation no translator may give for the owner; (c) the readers today (Hypatia's RSR scorer, `deed_lint`) accept the chora clauses, and A7 reads a chora `(agentic …)` or `(neurosym …)` with a warning for one release (YF05, YF06). Owner decision: when to move to the split form. +|=== + +=== Identity and canon pin + +[cols="1,3,4",options="header"] +|=== +| ID | Item | Disposition +| I-1 | `:repo-uuid` | Emitted as `#uuid"4f114668-94c6-8a71-a7b1-cd69345c08ad"`. Source: the registry seed `verisim/seed/chora-registry_praxis.deed` in `hyperpolymath/gv-clade-index` at `09ef2838` holds `(repo :name "valence-shell" :owner "hyperpolymath" :uuid #uuid"4f114668-…" :minted-in gv-clade-index …)`, with no `(former …)`, so the birth path is `github.com/hyperpolymath/valence-shell`. Cross-check: the ADR-008 profile C UUIDv8 of `gv-clade-index:github.com/hyperpolymath/valence-shell` recomputes to the same value; the same recipe reproduces absolute-zero's registry id. The legacy UUID in `.machine_readable/CLADE.a2ml` is a version 5 value and was not used (V8, Q2). The opaque `#uuid` form is used (U4); no `deed_lint` older than `#uuid` is pinned here (the dogfood gate's validator scans `.a2ml` only). *Owner check recommended:* the value was read from a fresh public clone of the registry, not from a pinned copy. +| I-2 | `:beholding-chora` | Emitted as `#uuid"0889b37b-defb-831f-973c-e119500db00e"`, the hyperpolymath estate id in the CHORA-SPEC section 9 table, recomputed from `chora:estate/github.com/hyperpolymath`. The birth estate is hyperpolymath (B1). +| I-3 | `(identity …)`, `(clade …)`, `(forges …)`, `(lineage …)`, `(status …)` | Not emitted. Their source is `.machine_readable/CLADE.a2ml`, out of scope here (O-1). CHORA-SPEC 5.4 (draft) makes `(identity …)` required once; that lands with the CLADE migration. +| C-1 | `(canon …)` pin | Emitted with `:version "2.1.5"`, `:criteria-sha256` and `:gates-sha256` copied from `canon.lock` `[canon]` and `[canon.artifacts]` at standards `151276d6`, and read back with standards' own `deed_canon` reader. `canon.lock` marks the release `status = "draft"`. `:lockstep-since` is not emitted: it is a per-repo adoption date the source does not carry. +|=== + +=== META + +[cols="1,3,4",options="header"] +|=== +| ID | Item | Disposition +| M-1 | `[metadata] project = "valence-shell"` | No table row (the family-2 `[metadata]` rows are `version` and `last-updated`). The value equals the deed's `:canonical-name`. Kept as a comment. +| M-2 | `[metadata] author` | Fail closed: the table row is `[project-info] author`, not `[metadata] author`; a corner shape extends the table, it is never translated ad hoc. Kept as a comment. +| M-3 | `[metadata] license = "MPL-2.0"` | Fail closed for the same reason. A `:license` is also a licence surface, which is owner-only. Kept as a comment. +| M-4 | `[metadata] standard = "RSR 2026"` | No table row. Kept as a comment. +| M-5 | No `version`, `last-updated`, ADRs, development practices or maintenance axes in the source | Nothing emitted, nothing invented, so no `(meta …)` clause (drop doctrine: a clause exists when it carries content). Hypatia's RSR criterion for META therefore reads no deed carrier; it did not read `6a2/` either. +|=== + +=== ECOSYSTEM + +[cols="1,3,4",options="header"] +|=== +| ID | Item | Disposition +| E-1 | `[metadata] project`, `ecosystem`; `[position] type` | Emitted as `:project "valence-shell"` (equals `:canonical-name`, P-6), `:ecosystem "hyperpolymath"`, `:position-type "component"`. +| E-2 | `[position] role = "operational-shell-layer"` | No table row (the `[position]` rows are `type`, `purpose`, `what-this-is-not`). Kept as a comment. +| E-3 | `[architecture]` (layer, layer-name, semantics-layer, receipts-layer) | No table row. Kept as a comment. +| E-4 | `[bridges.echo-types]`, `[bridges.ochrance]` | No table row, and not `[related-projects]` entries, so no `(related …)` is emitted: the source states no `relationship` from the closed set and no `notes`. The bridge's authority is `docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc` and `.machine_readable/ECHO_TYPES_OCHRANCE_BRIDGE.a2ml` (O-4). Owner input if these should become `(related …)` edges: the relationship term for each. +| E-5 | `[bridge-entry-points]` | No table row. Both paths still resolve; kept as a comment. +| E-6 | Source header comment "Forbidden-moves codified in `.machine_readable/MUST.contractile`" | Stale: no such file exists in the tree. Recorded, not fixed (the AGENTIC constraints text repeats it, A-2). +|=== + +=== AGENTIC + +[cols="1,3,4",options="header"] +|=== +| ID | Item | Disposition +| A-1 | `[metadata] version`, `last-updated`; `[agent-permissions]` | Emitted: `:version "0.1.0"`, `:last-updated "2026-03-16"`, `(permissions :source #t :tests #t :docs #t :config #t :create-files #t)`. +| A-2 | `[agent-constraints]` (comment-carried) | D4-1: the block diverges from template canon (it adds the bridge forbidden moves), so it fails closed. The family-4 table says a populated constraint is an edict, a `(rule …)` in `Mustfile.deed` (A7 YL3), and the contractiles are out of scope (O-2). Kept verbatim as deed comments. Owner input: the edicts, when the contractiles migrate. +| A-3 | `[bridge-aware-rules]` | No table row. Kept verbatim as deed comments. The CI script and workflow it names exist and still run. +| A-4 | `[maintenance-integrity]`, `[methodology]`, `[automation-hooks]` | Absent from the source, so `(integrity …)`, `(methodology …)` and `(hooks …)` are not emitted. The integrity booleans are not copied from the estate template: that would invent per-repo state. +|=== + +=== NEUROSYM + +[cols="1,3,4",options="header"] +|=== +| ID | Item | Disposition +| N-1 | `[metadata]`; `[hypatia-config] scan-enabled`, `scan-depth` | Emitted: `:version "0.1.0"`, `:last-updated "2026-03-16"`, `(hypatia :scan-enabled #t :scan-depth standard …)`. +| N-2 | `[hypatia-config] report-format = "logtalk"` | Emitted as `:report-format "json"`. This is the table's migration rule, not a guess: "`logtalk`", a retired format, becomes `"json"` and is never carried across. (absolute-zero, migrated before the rule, carried its value verbatim.) +|=== + +=== PLAYBOOK + +[cols="1,3,4",options="header"] +|=== +| ID | Item | Disposition +| P-1 | `[metadata] version`, `last-updated` | Emitted. +| P-2 | `[deployment]`, `[incident-response]`, `[release-process]` | They hold no keys, only commented text, so they are slot-preserved as empty clauses (family-1 slot doctrine, as the table rules). The commented text is kept verbatim as deed comments. +| P-3 | `[docs-format]`, `[maintenance-operations]`, `@profile` | Absent from the source. Not emitted: a slot with no source section would be invented structure. +| P-4 | Commented steps name `.machine_readable/STATE.a2ml` and `META.a2ml` | Stale: neither path is live. Owner input: the replacement steps (the deed and the archive). +|=== + +=== STATE (option B) + +[cols="1,3,4",options="header"] +|=== +| ID | Item | Disposition +| S-1 | `[metadata] status = "active"` | Not emitted. It duplicates the CLADE phase; the one lifecycle claim is the `(status …)` clause of `STATE.deed` (A7 J15), whose source is CLADE (O-1). +| S-2 | `[project-context] phase = "advanced-research-prototype"` | Not emitted. It is neither a lifecycle phase nor a maturity level (`experimental alpha beta production lts`), and picking one would be a judgement, not a translation. Owner input: the `(maturity :level …)` value. +| S-3 | `[metadata] version = "0.9.0"`, `last-updated` | Not emitted; no row in option B. The semver pin is `impl/rust-cli/Cargo.toml`. +| S-4 | `[project-context] completion-percentage = 78` | Dropped (derivable, state-v1-decision section 3). Note: `ROADMAP.adoc` quotes "~74%" from this file, which held 78; recorded, not corrected. +| S-5 | `[project-context] name`, `bridge-status`, `bridge-doc`, `bridge-a2ml` | Not emitted; the name is `:canonical-name`, and the bridge facts are carried by the bridge documents (E-4). +| S-6 | `[recent-work-2026-07-01]`, `[recent-work-2026-06-02]`, `[recent-work]`, `[session-history]` | Journal. Archived, not translated (v2 thin-journal doctrine). The record continues in `CHANGELOG.adoc` and git history. +| S-7 | `[coq-proof-status]` | Derivable counts and their prose. Archived. The live authorities are `docs/PROOF_HOLES_AUDIT.adoc` and `EXPLAINME.adoc` (Proof Ledger); the docs that pointed at this block now point there or at the archive (U-3, U-4). +| S-8 | `[dogfooding-status]` | Journal-shaped disclosure. Archived. `ROADMAP.adoc` still asks for it to be added to `STATE.a2ml` (U-6). +| S-9 | `[crg]` (grade C, audit notes) | No home in option B. Archived; the dated audit is `docs/governance/CRG-AUDIT-2026-04-18.adoc`. +|=== + +=== Directory manifest, README and anchor + +[cols="1,3,4",options="header"] +|=== +| ID | Item | Disposition +| G-1 | `6a2/0-AI-MANIFEST.a2ml` | A directory manifest for the six-file `6a2/` layout (canonical locations, lock-file protocol), not the root agent-allocation manifest of ai-manifest-decision. Its keys match no family table, so it fails closed. Archived only; the layout it describes no longer exists. +| R-1 | `6a2/README.adoc` | Archived only (`6a2-README.adoc.txt`); it described the retired directory. +| AN-1 | `(anchor …)` clause | Not emitted. The legacy anchor has no `authority`, and the clause requires `:authority` exactly once; A7 6.4 says such a translation is incomplete and the translator never invents one. *Owner input:* the `:authority` value, then the clause `(anchor :schema "hyperpolymath.anchor/2" :authority "…" (metadata :version "0.9.0"))`. +| AN-2 | `id: "org.hyperpolymath.valence-shell"` | Dropped (A7 6.4): the chora `:repo-uuid` is the id. +| AN-3 | `version: "0.9.0"` | Destination `(anchor (metadata :version "0.9.0"))`; waits for AN-1. Kept as a comment. +| AN-4 | `clade: "unknown"` | Dropped from the anchor. Placements come from chora-registry, which holds `clade-12` fv (primary) and ix (rank 1) for this repo; a chora `(clade …)` lands with the CLADE migration (O-1). +| AN-5 | `status: "active"` | Dropped from the anchor; lifecycle is `STATE.deed`'s (S-1). +| AN-6 | `ssg` (engine `casket`, output_dir `public`, boj_trigger `true`, cartridge `ssg-mcp`) | Destination `META.deed` `(ssg …)` (J29), which does not exist here (T-1). Kept as a comment. Owner input: confirm the values are this repo's and not template boilerplate. +| AN-7 | `parents: ["org.hyperpolymath.boj-server"]` | Destination an ECOSYSTEM `(related … :relationship parent :uuid …)` (J26). Not emitted: the registry records valence-shell as `standalone` with no parent, so this edge conflicts with the registry. Owner ruling needed. +|=== + +=== Out of scope (not migrated in this change) + +[cols="1,3,4",options="header"] +|=== +| ID | Item | Reason +| O-1 | `.machine_readable/CLADE.a2ml` | Excluded by the task. CLADE is not folded into a descriptile: its identity content goes to the chora deed and its lifecycle to `STATE.deed` (CHORA-SPEC 11.1, clade-to-repo-deed). Its own change. +| O-2 | `.machine_readable/contractiles/*.a2ml` | Excluded. Contractiles become edicts (`file.deed`) and K9 contracts, a separate migration. `Mustfile.a2ml`: the `six-directory-present` (critical) and `anchors-directory` checks named `.machine_readable/6a2/`; the first passed before this migration. Both are replaced by one `repo-deed-present` check (deed and ledger exist, `6a2/` is gone), so the invariant follows the layout instead of failing on every checkout (Codex review on #229). The `bust/`, `dust/` and `self-validating` checks name paths that were already absent and are unchanged. +| O-3 | `.machine_readable/bot_directives/*.a2ml` | Excluded. `methodology.a2ml` line 112 still says "Phase 0 reads STATE.a2ml first". Not edited (frozen A2ML). Its prose `README.adoc` was updated (U-7). +| O-4 | `.machine_readable/ECHO_TYPES_OCHRANCE_BRIDGE.a2ml` | Excluded. Named by `.github/scripts/check-bridge-forbidden-phrases.sh` as a required artefact and by `.claude/CLAUDE.md`. +| O-5 | `.machine_readable/IDRIS2_AXIOMS.a2ml` | Excluded and must stay in place: `.github/scripts/check-idris2-believe-me.sh` reads it, and `idris-verification.yml` triggers on it. +| O-6 | `.machine_readable/integrations/*.a2ml` (feedback-o-tron, proven, verisimdb, vexometer) | Not descriptiles; no mapping spec. Not touched. +| O-7 | Root `0-AI-MANIFEST.a2ml` | Not in `6a2/`. The root agent-allocation manifest has its own decision (ai-manifest-decision, option A, `(manifest …)`). Read by `Mustfile.a2ml`, `www/.well-known/ai.txt` and docs. Its own change. +| O-8 | `audits/assail-classifications.a2ml` | Not a descriptile. Not touched. +| O-9 | `alkahest-shell-transmuter/.machine_readable/6a2/` | A nested subproject with its own six `6a2/` files. Hypatia's SD004 reads only the repo root's `.machine_readable/6a2/`. Its own change. +|=== + +=== Consumers of the moved paths + +[cols="1,3,4",options="header"] +|=== +| ID | Item | Disposition +| U-1 | `.claude/CLAUDE.md` "Machine-Readable Artefacts" list | Updated to name the deed, this ledger and the archive (SD007). Nothing else in the file was changed. +| U-2 | `.claude/CLAUDE.md` language-policy table, row "Guile Scheme" | Named `.machine_readable/6a2/STATE.a2ml`, `META.a2ml` and `ECOSYSTEM.a2ml`. *Resolved 2026-11-17:* the row now points at `valence-shell_chora.deed`, following the absolute-zero precedent; the row's language rule is unchanged. SD007 clears. +| U-3 | `docs/README.adoc` (two references) | Updated to the deed, `PROOF_HOLES_AUDIT.adoc` and the archived STATE. +| U-4 | `proofs/coq/README.adoc` (three references) | Updated to the archived STATE and the live authorities. The file's own counts (`admitted = 1`) disagree with `docs/PROOF_HOLES_AUDIT.adoc` (0 admits); recorded, not corrected. +| U-5 | `ROADMAP.adoc` "Current Status" | The path updated to the archived STATE. The "~74%" figure is left as written (S-4). +| U-6 | `ROADMAP.adoc` open items "Add `[dogfooding-status]` to STATE.a2ml" and "Add 3+ ADRs to META.a2ml" | Both named retired files. The tasks are kept, reworded to drop the file names and marked "target pending", so nobody is sent to edit an archive (Codex review on #229). Where dogfooding status lives, and when ADRs become `(adr …)` entries (T-1), is still owner input. +| U-7 | `.machine_readable/bot_directives/README.adoc` | The `AGENTIC.a2ml` line now names the deed's `(agentic …)` clause. +| U-8 | Dated records: `CHANGELOG.adoc` history, `docs/audits/*`, `docs/governance/CRG-AUDIT-2026-04-18.adoc`, `docs/reports/*` | Left as written. +|=== + +=== Other + +[cols="1,3,4",options="header"] +|=== +| ID | Item | Disposition +| X-1 | No SPDX header in two archived sources (`6a2-0-AI-MANIFEST.a2ml.txt`, `6a2-anchor-ANCHOR.a2ml.txt`) | Not added; owner-only (licence edits are manual). +|=== + +== Validation (2026-11-17) + +[cols="3,2,5",options="header"] +|=== +| Check | Result | Notes +| `bun deed_lint.js valence-shell_chora.deed` (standards `151276d6`) | PASS | `OK valence-shell_chora.deed`. +| `deed_lint.js --ast-json` | PASS | Head `repo-deed`; top-level `:schema-version`, `:canonical-name`, `:beholding-chora`, `:repo-uuid`, and the clauses `canon`, `ecosystem`, `agentic`, `neurosym`, `playbook`. +| `deed_lint.js --anchor`, `--egress`, `--contractiles`, `--rsr-profile` | PASS | Each reports no such clause. +| standards `deed_canon` reader (from `scripts/check-canon-lockstep.sh`) | PASS | Reads `2.1.5` and both hashes. +| `.github/scripts/check-bridge-forbidden-phrases.sh` | PASS | Run after the edits. +| `git grep -n '6a2/'` | 1 live hit, an owner item | The frozen `Mustfile.a2ml` checks (O-2). Every other hit is in this archive and ledger, a `CHANGELOG.adoc` history entry (this change's included), a dated audit record, or the out-of-scope subproject (O-9). +|=== + +== Open items (owner) + +. Anchor `:authority` (AN-1), then the `(anchor …)` clause. +. The boj-server parent edge against the registry's `standalone` (AN-7); the `ssg` values (AN-6). +. The maturity level (S-2). +. Whether the bridges become `(related …)` edges, and with which relationship (E-4). +. The AGENTIC constraints as `Mustfile.deed` edicts (A-2). +. The `ROADMAP.adoc` items (U-6); the PLAYBOOK steps (P-4). +. When to move to the A7 split descriptile deeds, with their affirmation (T-1). +. Confirm the `:repo-uuid` read from the registry (I-1). +. SPDX headers on the two archived files that lack them (X-1). diff --git a/docs/README.adoc b/docs/README.adoc index 785b3df6..9df974eb 100644 --- a/docs/README.adoc +++ b/docs/README.adoc @@ -50,7 +50,8 @@ This README provides orientation; individual files are self-describing. | `PROOF_HOLES_AUDIT.adoc` | Active proof-debt ledger across the 6-system stack (Coq/Lean4/Agda/Isabelle/Mizar/Z3 + Idris2 ABI). Source of truth for - the `[coq-proof-status]` block in `../.machine_readable/6a2/STATE.a2ml`. + the `[coq-proof-status]` block of the retired `STATE.a2ml`, archived at + `../archive/a2ml-v1/6a2-STATE.a2ml.txt`. | `POSIX_COMPLIANCE.md` | Per-feature POSIX compliance tracker (M1-M11 milestones; M1-M9 @@ -105,4 +106,5 @@ This README provides orientation; individual files are self-describing. * `../README.md` / `../EXPLAINME.adoc` — repo entry points * `../CLAUDE.md` — AI-assistant honest-status document * `../ROADMAP.adoc` — release track + audit closure list -* `../.machine_readable/6a2/STATE.a2ml` — machine-readable state +* `../valence-shell_chora.deed` — the repo deed (machine-readable descriptiles); + migration record in `../archive/a2ml-v1/MIGRATION-LEDGER.adoc` diff --git a/docs/audits/2026-11-16-hypatia-remediation.adoc b/docs/audits/2026-11-16-hypatia-remediation.adoc index dec3dd02..2aace5c5 100644 --- a/docs/audits/2026-11-16-hypatia-remediation.adoc +++ b/docs/audits/2026-11-16-hypatia-remediation.adoc @@ -58,8 +58,8 @@ They close when the underlying alert closes. | RE001 (3) | fixed | `harden-runner`: `block` to `api.github.com` in `instant-sync.yml`, `block` to the SMTP endpoint in `push-email-notify.yml`, `audit` in `hypatia-scan.yml`. | RE005 | fixed | The ignored stress suite no longer runs under `continue-on-error` in `compilation_tests.yml`; see <>. | WH008 (3) | fixed | See the Secret Scanner section. -| SD022 (2) | fixed | Both paths named another tree (`echidna/src/rust/`, the Agda tarball's `src/data/lib`); now qualified. -| SD009 | left for the owner | `ffi/zig/src/main.zig` has no SPDX header. Licence edits are owner-only (estate doctrine 6). +| SD022 (2) | fixed | Both paths named another tree (`echidna/src/rust/`, the Agda tarball path `agda-2.7.0.1/src/data/lib`); now qualified. +| SD009 | fixed (owner-authorised, 2026-11-17) | `ffi/zig/src/main.zig` did have an SPDX identifier, on line 6 of its leading comment; the rule looks at line 1. The identifier (unchanged, `MPL-2.0`) now sits on line 1, and the file carries exactly one. An earlier entry here said the file had no header; that was wrong. | SD004 (6), SD007 | left for the owner | Moving `.machine_readable/6a2/` into deed clauses needs the estate converter (kyX, standards D312/D313); writing the clauses by hand would guess at metadata. | `known_fake_action_sha` (3), `download_then_run_shell` (1) in `alkahest-shell-transmuter/` | left for upstream | Owner ruling: fix the canonical alkahest repository, then re-sync this copy. These workflows never run here. |=== @@ -94,3 +94,9 @@ Run one test at a time on 2026-11-16, 120 s limit each: 5 fail (`stress_many_operations_10000`, `stress_resource_limits_max_history`), 3 pass; `stress_large_file_1gb` was not run. The CI step only ever reached the 30-minute job timeout. Repairing the suite is separate work. + +Update 2026-11-17: a repair was drafted on #229 and then moved to its own +pull request (owner ruling 2026-11-17). It replaced whole-file state saves +with an append-only journal, and review found the journal's crash handling +unsound in ways point fixes did not close. The suite and the CI step are +therefore unchanged here; the repair returns with the journal redesign. diff --git a/ffi/zig/src/main.zig b/ffi/zig/src/main.zig index 945b777a..dac99a51 100644 --- a/ffi/zig/src/main.zig +++ b/ffi/zig/src/main.zig @@ -1,9 +1,9 @@ +// SPDX-License-Identifier: MPL-2.0 // VALENCE_SHELL FFI Implementation // // This module implements the C-compatible FFI declared in src/abi/Foreign.idr // All types and layouts must match the Idris2 ABI definitions. // -// SPDX-License-Identifier: MPL-2.0 // Copyright (c) Jonathan D.A. Jewell const std = @import("std"); diff --git a/impl/rust-cli/src/parser.rs b/impl/rust-cli/src/parser.rs index da677ce3..9f31a40b 100644 --- a/impl/rust-cli/src/parser.rs +++ b/impl/rust-cli/src/parser.rs @@ -2281,17 +2281,11 @@ fn apply_expansion(expansion: &ParameterExpansion, state: &crate::state::ShellSt // Semantic assignment requires threading mutable state (and error // propagation) through the expansion API; tracked by #189. Until // that seam is redesigned this returns the default value only. - if is_unset || (*check_null && is_null) { + match var_value { + Some(v) if !(*check_null && is_null) => v.to_string(), // Note: In bash, this would also assign to VAR. // Requires signature change: &mut ShellState - expand_variables(value, state) - } else { - // var_value is Some by construction here: the surrounding - // `if is_unset || ...` branch is the unset/null path; this - // else branch only fires when var_value is Some. - var_value - .expect("var_value is Some when !is_unset (checked above)") - .to_string() + _ => expand_variables(value, state), } } @@ -2309,18 +2303,14 @@ fn apply_expansion(expansion: &ParameterExpansion, state: &crate::state::ShellSt check_null, } => { // ${VAR:?message} or ${VAR?message} - if is_unset || (*check_null && is_null) { - let error_msg = message.as_deref().unwrap_or("parameter null or not set"); - eprintln!("vsh: {}: {}", expansion.var_name, error_msg); - // Return empty string (bash exits non-interactively, but we continue) - String::new() - } else { - // var_value is Some by construction here: the surrounding - // `if is_unset || ...` branch is the unset/null path; this - // else branch only fires when var_value is Some. - var_value - .expect("var_value is Some when !is_unset (checked above)") - .to_string() + match var_value { + Some(v) if !(*check_null && is_null) => v.to_string(), + _ => { + let error_msg = message.as_deref().unwrap_or("parameter null or not set"); + eprintln!("vsh: {}: {}", expansion.var_name, error_msg); + // Return empty string (bash exits non-interactively, but we continue) + String::new() + } } } @@ -2925,9 +2915,9 @@ fn parse_if_command(input: &str) -> Result { // earlier ("elif", "after_then") arm set pending_condition // to Some. The match is exhaustive over (keyword, state) // shapes, so this take() is provably Some by construction. - let elif_cond = pending_condition - .take() - .expect("pending_condition: Some by state-machine invariant in after_elif"); + let elif_cond = pending_condition.take().ok_or_else(|| { + anyhow::anyhow!("parse error: `then` after `elif` with no pending condition") + })?; let body_str = content.trim().trim_end_matches(';').trim(); let elif_body = if !body_str.is_empty() { parse_command_block(body_str)? diff --git a/proofs/coq/README.adoc b/proofs/coq/README.adoc index ec48ad25..e521972c 100644 --- a/proofs/coq/README.adoc +++ b/proofs/coq/README.adoc @@ -16,14 +16,18 @@ extraction. | `filesystem_model.v` | Core `Filesystem = Path -> option FSNode` model + structural lemmas. - Note: this finite-domain model is the source of the - `is_empty_dir_dec` axiom (justified per `STATE.a2ml - [coq-proof-status] axiom-detail`). + Note: this function-based model is why `is_empty_dir_dec` + (`posix_errors.v`) is a theorem proved with classical logic, not a + custom axiom (see "Proof-debt status" below, and `[coq-proof-status] + axiom-detail` in the archived + `../../archive/a2ml-v1/6a2-STATE.a2ml.txt`). | `filesystem_composition.v` -| Composition theorems. Carries one declared `admit.` at line ~199 - (`single_op_reversible` OpRmdir branch — pre-existing model gap; - see `STATE.a2ml [coq-proof-status] admitted-detail`). +| Composition theorems. Contains no `admit.` or `Admitted.` markers: + the former `single_op_reversible` OpRmdir admit is closed with `Qed` + (see `[coq-proof-status] admitted-detail` in the archived + `../../archive/a2ml-v1/6a2-STATE.a2ml.txt`, re-verified 2026-07-16 + under Coq 8.18.0). | `filesystem_equivalence.v` | State-equivalence relations. @@ -66,14 +70,25 @@ make all # via auto-emitted Makefile == Proof-debt status -* `admitted = 1` — `single_op_reversible` OpRmdir branch - (`filesystem_composition.v:199`). -* `axioms-justified = 1` — `is_empty_dir_dec` (infinite-domain - decidability; migration path: switch to `FMaps.t FSNode`). -* All other proofs constructively closed. - -Authoritative status in `../../.machine_readable/6a2/STATE.a2ml` -under `[coq-proof-status]`. +* `admitted = 0` — no `admit.` or `Admitted.` marker in any `.v` file. +* No custom `Axiom`. The proofs do depend on three standard-library + axioms (`Print Assumptions`, Coq 8.18.0, re-run 2026-11-17): +** *Classical logic:* `is_empty_dir_dec` uses + `excluded_middle_informative`, so it depends on + `Classical_Prop.classic` and + `ClassicalEpsilon.constructive_indefinite_description` + (decidability over an infinite domain; migration path: switch to + `FMaps.t FSNode`). +** *Functional extensionality:* the reversibility theorems, for example + `mkdir_rmdir_reversible` and `single_op_reversible`, depend on + `FunctionalExtensionality.functional_extensionality_dep`, because a + filesystem is a function and they state equality of filesystems. +* So these proofs are not constructive, and are not axiom-free. + +Authoritative status in `../../docs/PROOF_HOLES_AUDIT.adoc` and the +Proof Ledger of `../../EXPLAINME.adoc`. The former `[coq-proof-status]` +block of `STATE.a2ml` is archived at +`../../archive/a2ml-v1/6a2-STATE.a2ml.txt`. == See also diff --git a/valence-shell_chora.deed b/valence-shell_chora.deed new file mode 100644 index 00000000..ba855d81 --- /dev/null +++ b/valence-shell_chora.deed @@ -0,0 +1,169 @@ +;; SPDX-License-Identifier: MPL-2.0 +; +; The repo deed of valence-shell: the machine-readable description of this +; repository (standards#837, one deed per repo, D312). It replaces the retired +; A2ML descriptiles that lived in .machine_readable/6a2/ (AGENTIC, ECOSYSTEM, +; META, NEUROSYM, PLAYBOOK, STATE, the directory 0-AI-MANIFEST, anchor/ANCHOR +; and the directory README). They are archived verbatim, with git history, +; under archive/a2ml-v1/6a2-*.txt (D99, D269c, D312, D313). +; +; Migration ledger, fail-closed items and per-field provenance: +; archive/a2ml-v1/MIGRATION-LEDGER.adoc (row IDs below cite it) +; Mapping specs followed, from metadatastician/standards at 151276d6: +; 1-formats/deed/mappings/{meta-ecosystem-to-repo-deed, +; agentic-neurosym-playbook-to-repo-deed, state-v1-decision (option B), +; ai-manifest-decision (option A)}.adoc, and the A7 section 6.4 anchor table. +; Worked precedent: hyperpolymath/absolute-zero absolute-zero_chora.deed. +; +; Target form (ledger T-1): the descriptiles are clauses of this chora deed, +; as the absolute-zero precedent and Hypatia SD004 name them. The A7 split +; into .machine_readable/descriptiles/{META,ECOSYSTEM,AGENTIC,NEUROSYM}.deed +; is the long-term canonical form, but A7 is a draft and those heads need an +; owner affirmation (:affirmed, :affirmed-by) that no translator may supply. +; +; Anything with no mapping-table row is kept as a comment in the clause it +; belonged to, with a ledger row. Nothing was invented to fill a field. +; Out of scope for this change (ledger O-1 to O-9): .machine_readable/CLADE.a2ml, +; the contractiles, bot_directives, ECHO_TYPES_OCHRANCE_BRIDGE.a2ml, +; IDRIS2_AXIOMS.a2ml, integrations/*.a2ml, the root 0-AI-MANIFEST.a2ml, +; audits/assail-classifications.a2ml and alkahest-shell-transmuter/. +(repo-deed + :schema-version "1.0.0" + :canonical-name "valence-shell" + + ; Identity (ledger I-1, I-2). Both values are opaque v8 chora ids (U4, V8), + ; copied, never minted here. + ; :repo-uuid is the registry's id for the birth path hyperpolymath/valence-shell, + ; :minted-in gv-clade-index, read from gv-clade-index + ; verisim/seed/chora-registry_praxis.deed at 09ef2838 and re-derived with the + ; ADR-008 profile C recipe (they agree). + ; :beholding-chora is the hyperpolymath estate id, CHORA-SPEC section 9 table. + :beholding-chora #uuid"0889b37b-defb-831f-973c-e119500db00e" + :repo-uuid #uuid"4f114668-94c6-8a71-a7b1-cd69345c08ad" + + ; The canon pin (vocabulary/canon.adoc): standards canon.lock [canon] version + ; and the [canon.artifacts] criteria and gates hashes, copied from + ; metadatastician/standards at 151276d6. :lockstep-since is not emitted: it + ; is a per-repo adoption date with no source here (ledger C-1). + (canon + :version "2.1.5" + :criteria-sha256 "6a5aa8857bd0d0d58ef48827938ca17c251b6b854dacf59d306388d61694d82a" + :gates-sha256 "5c510bba025be718deebb12d0333bfe7db2da43c66578b728b1a334df65290b1") + + ; ---- META.a2ml (family 2) ------------------------------------------------ + ; No (meta …) clause: every source key sits under [metadata], and the family-2 + ; table carries only version and last-updated there, which the source lacks. + ; The keys fail closed (ledger M-1 to M-5). Verbatim, for reference: + ; [metadata] project = "valence-shell" (the deed's :canonical-name) + ; [metadata] author = "Jonathan D.A. Jewell " + ; [metadata] license = "MPL-2.0" (licence surface: owner only) + ; [metadata] standard = "RSR 2026" + ; header: "Converted from META.scm on 2026-03-15" + + ; ---- ECOSYSTEM.a2ml (family 2) ------------------------------------------- + ; [position] role "operational-shell-layer" has no table row (ledger E-2). + ; [architecture] (layer 1 "operational-shell"; semantics-layer echo-types; + ; receipts-layer ochrance), [bridges.echo-types], [bridges.ochrance] and + ; [bridge-entry-points] have no table row and are not [related-projects] + ; entries, so they fail closed (ledger E-3 to E-5). Their authority is + ; docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc and + ; .machine_readable/ECHO_TYPES_OCHRANCE_BRIDGE.a2ml: the bridge is + ; documentation-and-orientation-only, mechanised = false, for both + ; hyperpolymath/echo-types and hyperpolymath/ochrance. + (ecosystem + :project "valence-shell" + :ecosystem "hyperpolymath" + :position-type "component") + + ; ---- AGENTIC.a2ml (family 4) --------------------------------------------- + ; The source has no [maintenance-integrity], [methodology] or + ; [automation-hooks], so no (integrity …), (methodology …) or (hooks …) is + ; emitted (ledger A-4). + ; [agent-constraints] is comment-carried and DIVERGES from template canon + ; (it adds the bridge forbidden moves), so D4-1 fails it closed. A populated + ; constraint is an edict for Mustfile.deed (A7 YL3), which is out of scope. + ; Kept verbatim (ledger A-2): + ; - Never use banned language patterns (believe_me, unsafeCoerce, etc.) + ; - Never commit secrets or credentials + ; - Never use banned languages (TypeScript, Python, Go, etc.) + ; - Never place state files in repository root (must be in .machine_readable/) + ; - Never use AGPL license (use MPL-2.0) + ; - Never violate the Echo Types / Ochrance bridge forbidden-moves: + ; no "production-ready", no "mechanised Lean-to-Rust", no "RMO/GDPR beyond stubs", + ; no "Echo Types proves Valence Shell implementation correctness", + ; no "Ochrance cryptographic integrity" while upstream gaps remain. + ; See docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc + MUST.contractile invariants-bridge. + ; CI-enforced via .github/scripts/check-bridge-forbidden-phrases.sh. + ; [bridge-aware-rules] has no table row (ledger A-3). Verbatim: + ; read-first = "docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc" + ; manifest = ".machine_readable/ECHO_TYPES_OCHRANCE_BRIDGE.a2ml" + ; status = "documentation-and-orientation-only"; mechanised = false + ; echo-types-audit-required = true + ; ci-enforcement-script = ".github/scripts/check-bridge-forbidden-phrases.sh" + ; ci-workflow = ".github/workflows/bridge-forbidden-phrases.yml" + (agentic + :version "0.1.0" + :last-updated "2026-03-16" + (permissions :source #t :tests #t :docs #t :config #t :create-files #t)) + + ; ---- NEUROSYM.a2ml (family 4) -------------------------------------------- + ; report-format: the source value "logtalk" is a retired format. The + ; family-4 migration rule rewrites it to "json" and never carries it across + ; (ledger N-2). + (neurosym + :version "0.1.0" + :last-updated "2026-03-16" + (hypatia + :scan-enabled #t + :scan-depth standard + :report-format "json")) + + ; ---- PLAYBOOK.a2ml (family 4) -------------------------------------------- + ; The three source sections hold no keys, only commented text, so they are + ; slot-preserved as empty clauses. Their comments, verbatim (ledger P-2, P-4): + ; [deployment] # method = "gitops" # target = "container" + ; [incident-response] 1. Check .machine_readable/STATE.a2ml for current status + ; 2. Review recent commits and CI results + ; 3. Run just validate to check compliance + ; [release-process] 1. Update version in STATE.a2ml, META.a2ml + ; 2. Run just quality (format, lint, test) + ; 3. Tag and push + ; The source has no [docs-format] or [maintenance-operations] section and no + ; @profile line, so neither slot nor (profile …) is emitted (ledger P-3). + (playbook + :version "0.1.0" + :last-updated "2026-03-16" + (deployment) + (incident-response) + (release-process)) + + ; ---- STATE.a2ml (family 3, option B) ------------------------------------- + ; Nothing is emitted (ledger S-1 to S-9). The lifecycle claim + ; ([metadata] status "active") duplicates the CLADE phase and belongs to the + ; (status …) clause of STATE.deed (A7 J15), fed from CLADE, which is out of + ; scope. [project-context] phase "advanced-research-prototype" is not a + ; maturity level (experimental alpha beta production lts), so no + ; (maturity …) is emitted: the owner picks the level. The journal sections, + ; [coq-proof-status], [dogfooding-status] and [crg] are archived, not + ; translated. Live proof status: docs/PROOF_HOLES_AUDIT.adoc and + ; EXPLAINME.adoc (Proof Ledger). + + ; ---- 6a2/0-AI-MANIFEST.a2ml and 6a2/README.adoc --------------------------- + ; Directory manifest and directory README for the retired 6a2/ layout. + ; Archived only; they describe a layout that no longer exists (ledger G-1, R-1). + + ; ---- 6a2/anchor/ANCHOR.a2ml (A7 section 6.4) ------------------------------ + ; No (anchor …) clause yet: the legacy anchor has no `authority`, which the + ; clause requires exactly once, and the translator never invents one. The + ; translation is incomplete until the owner supplies it (ledger AN-1). + ; Legacy fields and their A7 6.4 destinations: + ; id "org.hyperpolymath.valence-shell" -> dropped; :repo-uuid is the id (AN-2) + ; version "0.9.0" -> (anchor (metadata :version "0.9.0")) once the clause lands (AN-3) + ; clade "unknown" -> dropped; placements come from chora-registry (AN-4) + ; status "active" -> dropped; lifecycle is STATE.deed's (AN-5) + ; ssg engine "casket", output_dir "public", boj_trigger true, cartridge "ssg-mcp" + ; -> META.deed (ssg …) under J29; not emitted here (AN-6) + ; parents "org.hyperpolymath.boj-server" -> ECOSYSTEM (related … :relationship parent); + ; not emitted: the registry records valence-shell as standalone with no + ; parent, so the owner rules first (AN-7) +)