diff --git a/.machine_readable/6a2/ECOSYSTEM.a2ml b/.machine_readable/6a2/ECOSYSTEM.a2ml index 90ee0f7..25b96af 100644 --- a/.machine_readable/6a2/ECOSYSTEM.a2ml +++ b/.machine_readable/6a2/ECOSYSTEM.a2ml @@ -6,7 +6,7 @@ [metadata] version = "1.0.0" -last-updated = "2026-03-24" +last-updated = "2026-06-13" [project] name = "007-lang" @@ -37,6 +37,16 @@ from compile-time Tier 5 backend selection. Audit: 2026-04-27.""" }, { name = "idaptik", relationship = "potential-consumer", notes = "Game AI agents driven by 007 choreographies" }, { name = "burble", relationship = "potential-consumer", notes = "Voice agents using 007 session types" }, { name = "echidna", relationship = "potential-consumer", notes = "Formal verification of 007 programs" }, + { name = "echo-types", + relationship = "type-system-dependency", + notes = """Constructive Agda formalization of fibre-based structured loss ("Echo +residue"): Echo f y := Σ(x:A), f x ≡ y, keystone A ≃ Σ B (Echo f). 007's type system +incorporates it as Kategoria LAYER 10 reversibility — the Echo residue IS the reversal +log that makes `reverse`/`irreversible` type-safe (spec OPERATIONAL-SEMANTICS §11.3 +now enforced; PR #34, proofs/idris2/EchoResidue.idr). Phase 2 bridges to echo-types' +linear strand (EchoLinear) for the Linear> undo-capability + cross-handler +reversal. See docs/echo-residue-integration.adoc. Relates to anvomidav (reversible +computing) and ephapax (linear handles).""" }, ] [integration-points] diff --git a/.machine_readable/6a2/META.a2ml b/.machine_readable/6a2/META.a2ml index 1fc234c..0749763 100644 --- a/.machine_readable/6a2/META.a2ml +++ b/.machine_readable/6a2/META.a2ml @@ -58,6 +58,13 @@ context = "Verification needs a stable binary target." decision = "Adopt typed-wasm as the only verified codegen target." consequences = "007 IR is lifted onto typed-wasm surface sugar for formal verification." +[project-meta.architecture-decisions.adr-007] +status = "accepted" +date = "2026-06-13" +context = "007 has reversible/irreversible/reverse blocks (OPERATIONAL-SEMANTICS §11), but the type checker checked all three identically — the spec's §11.3 rule ('a reverse targeting an irreversible block is a compile-time error') was unenforced. The principled mechanism is echo-types' theory of structured loss." +decision = "Integrate echo-types' Echo residue as Kategoria LAYER 10 reversibility. Echo f y := Σ(x:A), f x ≡ y; keystone A ≃ Σ B (Echo f) (irreversible computation + its echo = reversible). reversible retains a residue, irreversible discards it, reverse requires one in scope. PHASED: scoped per-body enforcement now; phase 2 = residue as a first-class Linear> undo-capability (reuses linear handles + echo-types' EchoLinear), which also validates cross-handler reversal." +consequences = "spec §11.3 is now ENFORCED; reverse-without-residue is a compile-time error surfaced to agents as L10_REVERSE_WITHOUT_RESIDUE with mark_reversible/retain_echo remediations. Mechanised in proofs/idris2/EchoResidue.idr (zero believe_me). The Echo residue is the type-level shadow of the hermeneutic `trace` an irreversible step discards. See docs/echo-residue-integration.adoc." + # ── Development Practices ────────────────────────────────────────────────── [project-meta.development-practices] build-tool = "just" diff --git a/.machine_readable/6a2/STATE.a2ml b/.machine_readable/6a2/STATE.a2ml index 52eb993..ce71dce 100644 --- a/.machine_readable/6a2/STATE.a2ml +++ b/.machine_readable/6a2/STATE.a2ml @@ -6,17 +6,20 @@ @state(version="2.0"): phase: "implementation" -next_action: "Complete parser gap fill (types, imports, reversibility, locales, choreographies)" -last_action: "PataCL/JtV overlap audit completed 2026-04-27 — 007 is NOT a current PataCL host (see [patacl-relationship])" -updated: 2026-04-27T00:00:00Z +next_action: "Phase-2 echo-residue (Linear> undo-capability + cross-handler reversal); reconcile estate-standardization-20260607 into main; continue parser gap fill (types, imports, locales, choreographies)" +last_action: "echo-types integrated as Kategoria Layer 10 reversibility — Echo residue makes reverse/irreversible type-safe (spec §11.3 now ENFORCED), Idris2 EchoResidue.idr proof, agent-facing L10_REVERSE_WITHOUT_RESIDUE (PR #34 merged); test/E2E/clippy/fmt CI gates greened (PR #38 merged); CI reconciled at root: hypatia ssh→https, A2ML 40→0, K9 7→0, grammar-guard, eclexiaiser merge-conflict, stapeln" +updated: 2026-06-13T07:40:00Z @blockers: -- id: clippy-drift - description: "Clippy does not pass cleanly across the workspace" - since: 2026-03-30 - id: proof-debt description: "Harvard and broader soundness claims require formal Idris2 proof closure" since: 2026-03-30 +- id: ci-billing + description: "GitHub Actions billing/spending-limit rejection — every job fails in 2-3s with no logs; blocks CI validation of all pushes (account-owner action: Settings → Billing & plans)" + since: 2026-06-13 +- id: estate-standardization-unmerged + description: "estate-standardization-20260607 (estate-standards catch-up: contractiles, bot_directives, svc/k9→self-validating rename, 24 CI workflows) diverged from main AND conflicts with PR #34/#38 (ci.yml + K9 guards renamed from PRE-#38 content, so the K9! magic/pedigree fixes must be re-applied during reconciliation)" + since: 2026-06-13 @end @note(id="patacl-relationship", added="2026-04-27"): diff --git a/.machine_readable/session-log.txt b/.machine_readable/session-log.txt index 9e85cde..51500b8 100644 --- a/.machine_readable/session-log.txt +++ b/.machine_readable/session-log.txt @@ -23,4 +23,7 @@ [2026-06-13 06:30:00] Session started: Claude Opus 4.8 (large context, remote/web execution, "undercover" model identity) — user ask walked from "work through the proofs, full focus" → "focus on the language [007]; nextgen-languages is context" → "ensure echo-types are a FEATURE OF THE TYPECHECKER, integrated into the typesystem, ideally design-wide" → "shepherd it through the CI/CD gate, fixing any pre-existing problems at ROOT" → this comprehensive reconcile+docs checkpoint. Design lens held throughout: 007 is a language for AGENTS (agent ergonomics), hermeneutic semantics; user wants plus/minus/interesting at design junctures. [2026-06-13 07:40:00] Session ended: PR #34 MERGED to origin/main (echo-types Layer 10 + CI root-fixes). Cleanup work (test/E2E gates) is in the WORKING TREE on branch claude/ci-cleanup-fmt-clippy-examples — commit+rebase-onto-main+PR PENDING (git commit attempts hit a transient command-safety-classifier outage; NEXT SESSION: `git status` first, commit if uncommitted, rebase --onto origin/main, open the PR). #34 commits: 875b9c6 echo-types Layer 10, db17a5f CI root-fixes, 5a80af5 gitignore. (a) ECHO-TYPES → TYPE SYSTEM (Layer 10 — THE REALIGNMENT): echo-types' Echo residue (Echo f y := Σ(x:A), f x=y; keystone A ≃ Σ B (Echo f)) integrated as Kategoria Layer 10 reversibility. typechecker.rs: new Type::Echo(Box); per-body residue stack on TypeEnv; split rule reversible(retains residue)/irreversible(discards)/reverse(requires) — ENFORCES spec OPERATIONAL-SEMANTICS §11.3 ("reverse of an irreversible block is a compile-time error"), previously UNenforced (all three were checked identically). agent_api.rs: agent-facing error code L10_REVERSE_WITHOUT_RESIDUE + mark_reversible/retain_echo remediations (the residue is the type-level shadow of the `trace` an irreversible step discards). +4 typechecker_tests (oo7-core lib 880). PHASED (user decision): scoped enforcement landed; PHASE 2 = residue as a first-class LINEAR value Linear> reusing 007 linear handles + echo-types EchoLinear, which also fixes cross-handler reversal (reversible in on receive / reverse in on error) — designed in docs/echo-residue-integration.adoc. (b) PROOF: proofs/idris2/EchoResidue.idr (Idris2 0.8.0, %default total, zero believe_me) — encode/decode + decodeEncode/encodeDecode (= A ≃ Σ B (Echo f)), reverseWithEcho(+Correct), collapseHasNoSection (no-section), reverseAfterIrreversibleIllTyped (ReverseOk Irrev uninhabited = the typing rule). idris2 --check clean. Spec: TYPE-SYSTEM-SPEC §"Layer 10", OPERATIONAL-SEMANTICS §11.4; CHANGELOG updated. (c) CI ROOT-FIXES (db17a5f, MERGED): hypatia dep ssh://→https:// + refreshed stale lock rev →79c7036 (cargo could NOT auth the SSH source → check/test/E2E/hypatia all died at dependency resolution BEFORE compiling; dep is feature-gated `hypatia-typed` so https resolves-not-builds); eclexiaiser.toml committed git MERGE-CONFLICT resolved (→ canonical "007-lang"); grammar-guard FALSE-POSITIVE fixed in ci.yml (anchor Harvard check on `^data_…=` rule definitions, not any line co-mentioning data_+control_; `agent_member = { data_block | control_block | state_decl }` union is legitimate); A2ML 40→0 errors (added (project "007-lang") to 35 auto-generated *.sidecar.a2ml + the canonical-proof-suite-runner.sh sidecar TEMPLATE + 5 real manifests: axiom-triage, memory-tag-map, FOLLOWUPS, daemon/manifest, oo7-control-plane/manifest); K9 7→0 errors (K9! magic line + pedigree/signature to adjust/intend/harvard-guard/methodology-guard .k9.ncl); stapeln.toml malformed entrypoint array. Verified by cloning + running the UPSTREAM hyperpolymath/a2ml-validate-action + k9-validate-action (→ 0 errors each). (d) TEST+E2E GATE CLEANUP (WORKING TREE, branch claude/ci-cleanup-fmt-clippy-examples, COMMIT PENDING): aggregator.rs `pipeline = pipeline` self-assignment removed (+ unneeded mut); oo7-typechecker-oracle #![allow(clippy::result_large_err)] (justified: flat error enum kept un-boxed for differential-fuzz clarity); cargo clippy --fix for mechanical lib/bin lints; REPO-WIDE cargo +nightly fmt; tests/e2e.sh Sections 1(parse)+3(run) now SKIP aspirational/illustrative examples consistently with Section 2 + integration_tests.rs "parse limitation" policy. Verified locally: clippy -D warnings exit 0, fmt --check 0 diffs, cargo test 22 suites ok 0 fail, e2e.sh PASS=46 FAIL=0. (e) DISCOVERY — NON-BLOCKING infra gates (PR #34 MERGED with all of these RED, so they are NOT merge-blocking): scan/gitleaks (gitleaks-action@v2 needs org GITLEAKS_LICENSE secret; local gitleaks scan = 0 leaks → CI infra, not repo content), analyze(actions) CodeQL (GHAS / code-scanning settings), hypatia/Hypatia Neurosymbolic Analysis (org analyzer; its sibling "Hypatia neurosymbolic scan" PASSES), Run canonical proof suite (by-design red until all 15+ entries land — Coq/Rocq unavailable: opam is network-blocked here, host_not_allowed). NONE fixable in repo files. (f) TOOLCHAIN set up this session (a fresh container must redo): apt agda 2.6.3; stdlib v2.3 cloned ~/agda-stdlib + ~/.agda/libraries=(standard-library, absolute-zero@3ff5cee), needs LC_ALL=C.UTF-8; Idris2 0.8.0 bootstrapped via chez → ~/.idris2/bin; rustup nightly + rustfmt 1.9.0 (CI fmt is nightly!); Coq 8.18 apt CANNOT parse `From Stdlib …` (needs Rocq 9 via opam — BLOCKED); cargo OK now hypatia is https; upstream validator actions cloned at /tmp/{a2ml-action,k9-action}. Blockers: (1) transient classifier outage blocked the cleanup git commit/push — resolve first thing; (2) opam network-block → no Rocq 9 → canonical-suite Coq entries unverifiable in this env. Next actions (THE BROAD CHECKPOINT — user-requested, IN PROGRESS, resume here after /compact): (i) commit cleanup working tree → rebase --onto origin/main → open test/E2E-gates PR; (ii) BRANCH RECONCILE — claude/inspiring-meitner-QHuNU is MERGED (safe to delete remote), enumerate other remote branches and decide merge/drop; (iii) DOC-CURRENCY sweep: 6a2 {STATE,META,ECOSYSTEM,AGENTIC,NEUROSYM,PLAYBOOK} + ANCHOR.a2ml realignment (echo-types Layer 10 is a significant realignment) + contractiles {Must,Intend,Adjust,Trust,Just, Bust,Dust} + self-validation svc/k9 + CREATE .machine_readable/bot_directives (hypatia / gitbot-fleet / .git-private-farm) + WIKI bleeding-edge + README/EXPLAINME; (iv) STANDARDS / rsr-template DRIFT CHECK — FLAG IMMEDIATELY if rsr-template-repo appears to have diverged from standards; (v) recency-gate the other in-scope repos (nextgen-languages, nextgen-typing, echo-types) — only sweep if no bot did them in the last day; (vi) resume main proof/language work. +[2026-06-13 07:43:00] CRITICAL COORDINATION FINDING (billing resurfaced): all 24 check-runs on PR #38 (HeadSHA 50ba239) report `failure` within 2-3 seconds of starting (07:42:46→07:42:49) with NO logs (job-log API → HTTP 404), INCLUDING trivial jobs (validate, check, Empty-linter, Patch Bridge CVE triage, openssf). This is the SAME GitHub Actions billing / spending-limit rejection documented in the 2026-04-13 01:25 entry — jobs are rejected before running, not failing on content. It is NOT a code regression from the #38 fmt/clippy/e2e cleanup (a broken tree still produces logs; these have none). USER ACTION REQUIRED (hyperpolymath account owner only): GitHub → Settings → Billing & plans → restore payment / raise spending limit, then re-run. Until then NO CI validates ANY push on this repo. #38's content is verified LOCALLY: clippy -D warnings exit 0, fmt --check 0 diffs, cargo test 22 suites ok, e2e.sh PASS=46 FAIL=0. (Aside: #34 merged earlier today while billing was briefly OK, or was admin-merged; main tip 88a8ff4 "standardize secret scanning on TruffleHog" is a maintainer commit.) +[2026-06-13 12:06:00] UPDATE: PR #38 MERGED to origin/main. BOTH this session's PRs are now in main (#34 echo-types Layer 10 + CI root-fixes; #38 test/E2E gates + session-log checkpoint). main is the single reconciled line. Branch-reconciliation now reduces to: both feature branches (claude/inspiring-meitner-QHuNU, claude/ci-cleanup-fmt-clippy-examples) are MERGED → safe to delete. Remaining next-actions unchanged: (ii) delete the two merged branches + enumerate any OTHER remote branches; (iii) doc-currency sweep (6a2, ANCHOR realignment, contractiles incl. Bust/Dust, svc/k9, CREATE bot_directives/, README/EXPLAINME, wiki bleeding-edge); (iv) standards/rsr-template drift check (flag divergence immediately); (v) recency-gate nextgen-languages/nextgen-typing/echo-types; (vi) resume main work. NOTE: GitHub Actions billing rejection may still be active — verify before relying on CI. +[2026-06-13 12:25:00] BRANCH DECISION (item 3): chore/hypatia-scan-reusable-wrapper assessed → DROP (superseded, do not re-create). Evidence: (1) main already DELETED its inline hypatia-scan.yml; (2) main's codeql.yml already uses the `actions` extractor (the branch's "codeql actions matrix" commit is redundant); (3) estate-standardization-20260607 redoes BOTH codeql.yml + hypatia-scan.yml, and its hypatia-scan.yml is the same thin standards reusable-wrapper but pinned to a NEWER standards SHA (6cd3772) vs the branch's stale 97df762. The branch (3 wks old, 24 commits behind main, 3 commits ahead) adds nothing not better-done by main + estate-standardization. DELETION BLOCKED from this remote-exec env: the local git proxy rejects push-deletes ("remote end hung up") and the GitHub MCP has no delete-branch/ref tool. ACTION (account owner): delete chore/hypatia-scan-reusable-wrapper, OR it retires naturally when estate-standardization-20260607 lands. Remaining open branch decision: estate-standardization-20260607 (the standards catch-up; conflicts with #34/#38; needs maintainer-driven reconcile — re-apply the K9!/grammar fixes into the renamed self-validating/ guards).