Skip to content

Claude/happy mendel b4 ie u - #344

Merged
hyperpolymath merged 8 commits into
mainfrom
claude/happy-mendel-b4IeU
May 24, 2026
Merged

Claude/happy mendel b4 ie u#344
hyperpolymath merged 8 commits into
mainfrom
claude/happy-mendel-b4IeU

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

No description provided.

claudeand others added 8 commits May 23, 2026 23:14
Adds the four standards documents and CI scaffolding the testing
survey flagged as missing:
- docs/standards/TESTING.adoc (DOC-10) — authoritative test taxonomy
(alcotest unit / alcotest E2E / fixture / golden / smoke /
microbench), PR-level expectations, deferred-regression-test
protocol. Pointers go through CAPABILITY-MATRIX for the live
gate count rather than hard-coding it.
- docs/standards/PANIC-ATTACK.adoc (DOC-11) — SOP for the estate
compliance scanner. Disposition vocabulary (fix/accept/suppress/
defer); standing-suppression record format. Companion workflow
.github/workflows/panic-attack.yml runs weekly on Sunday 03:00
UTC + workflow_dispatch; uploads the log as artifact. Per-PR
invocation is intentionally out of scope (codeql/semgrep/secret-
scanner already cover per-PR at finer granularity).
- bench/ scaffold (DOC-12, half) — dune stanza under @bench alias,
4 phase microbenches (lex / parse / typecheck+quantity /
codegen-wasm) over 3 shared fixtures. just bench / just
bench-record recipes. CI job bench-visibility uploads
bench-output.log as artifact + step summary. Visibility-only —
no merge-blocking threshold.
- bisect_ppx coverage (DOC-12, half) — added as with-test depend
in dune-project + affinescript.opam. just coverage recipe
(HTML to _coverage/, gitignored). CI job coverage-visibility
uploads _coverage as artifact + summary. Visibility-only — no
enforced floor (ratchet prerequisite: calibrated baseline).
- Stale TESTING-REPORT.adoc + .scm retired in-place with redirects
to CAPABILITY-MATRIX.adoc + standards/TESTING.adoc. The 2025-12-29
"47 PASS / 27 FAIL / 63.5%" snapshot has been contradicted by the
live gate (>250 / 0 fail) for the entire first half of 2026; a
DOC-09 over-claim hazard if left in place.
- STATE.a2ml drift-flag refreshed: live gate is 260/260 at
2026-05-19 reconstruction, lifted by subsequent borrow-checker
PRs (#240 → 263, return-escape → 271/274, &mut surface → 278/281);
exact live number comes from dune runtest --force per commit, not
this file. Session-note hygiene-uplift-2026-05-23 recorded.
- TECH-DEBT.adoc DOC-10/11/12 entries added.
- NAVIGATION.adoc + docs/README.adoc updated to list the new
standards and mark TESTING-REPORT as RETIRED.
Not yet verified locally (no OCaml toolchain in this remote
execution environment); rely on CI for build + test + bench
verification.
Refs #175, #176
Three single-session Stage D items grouped into one commit:
(1) INT-01 follow-up (Refs #178): `Mod::fn(x)` in value-expression
position. lib/parser.mly adds one production —
`upper_ident COLONCOLON lower_ident` → `ExprField(ExprVar Mod,
lower_ident)`, the same AST shape `Mod.fn` already produces.
Disambiguated from the existing `Type::Variant` rule by token
class (lower vs upper). No resolver change required:
Resolve.lower_qualified_value_paths handles both `.` and `::`
syntaxes identically because the lowering pattern-matches on
the ExprField shape, not on the source separator.
Two new fixtures + two alcotest cases pin both
`use Mod; Mod::fn(x)` and `use Mod as M; M::fn(x)`. The
ledger note "Mod::fn(x) in expression position is a parse
error … `::` reserved for Type::Variant" is now closed.
(2) BUG-005 deferred regression test landed. The original
[[closed-bug]] record had `regression-test-status = "deferred —
fixture needs a known-unknown function name in a WasmGC compile
path"`. test_gc_unbound_function_loud_fail does exactly that:
parses `fn main() -> Int { return totally_undefined_callee(42); }`,
feeds it directly to Codegen_gc.generate_gc_module (no resolve
step), asserts the emitted error contains the unknown name —
which UnboundFunction's format string includes verbatim. A
regression to silent drop+null would fail this gate.
(3) docs/STDLIB-EXTERN-AUDIT.adoc — triage of all 135 `extern fn`
+ 24 `extern type` across 11 stdlib files into 4 classes
(built-in / typed-boundary-bridge / adapter-Deno / adapter-
Node) with per-row status and unblock condition. STDLIB-04
ledger entry now points here; implementation PRs close one
row at a time, audit doc is the canonical long-tail roadmap.
STATE.a2ml: stage-d-batch-2026-05-23 session note recorded;
BUG-005 regression-test-status flipped from "deferred" to "landed
2026-05-23".
Not yet verified locally (no OCaml toolchain in remote env).
Parser change is low-risk: single production, no Menhir conflict
delta expected — `upper_ident COLONCOLON lower_ident` is
unambiguous against the prior `upper_ident COLONCOLON upper_ident`
rule by token class. CI is the verification surface.
Refs #178, Refs STDLIB-04
For DOC-10/11 + STDLIB-04 the human-readable .adoc carries rationale
and prose; the .a2ml is the structured form bots / agents / tools
consume to decide what counts. Each .a2ml names its human companion
in [metadata].human-companion and mirrors its parameters under typed
keys.
Additions:
- docs/standards/TESTING.a2ml — gate command + workflow + job, the
six test kinds with their homes/drivers/add-when, the five
PR-level rules with their triggers, deferred-regression-test
reasons, bench + coverage visibility-only status, cross-refs.
- docs/standards/PANIC-ATTACK.a2ml — three schedules (cron / pre-
release / ad-hoc) with their blocking severities, the four-key
disposition vocabulary (fix/accept/suppress/defer), standing-
suppression record format, rule set mirror of panic-attack.toml.
- docs/STDLIB-EXTERN-AUDIT.a2ml — totals (135 extern fn / 24 extern
type / 11 files), the four classes with their real-impl
criterion, per-module rows with status/done/partial/stub-only
lists and next-row pointers, implementation policy.
Pure additions; no behavioural change. The .adoc files remain
authoritative for prose, the .a2ml for parameters.
Refs DOC-10, DOC-11, STDLIB-04
Until this commit the AffineScript ↔ typed-wasm interface was
*referenced* from docs/ECOSYSTEM.adoc §"actual AffineScript ↔
typed-wasm contract" + code comments in lib/codegen.ml,
lib/tw_interface.ml, lib/tw_verify.ml — it had no dedicated home.
Adds the dedicated home:
- docs/specs/TYPED-WASM-INTERFACE.adoc (human; formal spec)
- docs/specs/TYPED-WASM-INTERFACE.a2ml (machine-readable companion)
Captures:
* Enforced surface: L7 (aliasing), L10 (linearity), L13 (module
isolation, negative form). L1–L6 / L14–L16 spec-level only.
* Carrier: affinescript.ownership v1 binary layout (LE):
u32 entry_count
per entry: u32 func_index | u8 param_count
| u8[n] param_kind | u8 ret_kind
kind ∈ {0 Unrestricted, 1 Linear, 2 SharedBorrow,
3 ExclBorrow}
v1 is unversioned (accident-of-history); ADR-020 proposed.
* Producer machinery: file/line pointers to lib/codegen.ml
emit symbols (ownership_kind_of_param, build_ownership_section,
ctx.ownership_annots, ...).
* Consumer machinery: lib/tw_verify.ml (per-module) +
lib/tw_interface.ml (cross-module boundary, with
LinearImportCalledMultiple + LinearImportDroppedOnSomePath).
* CLI surface: verify / verify-boundary / verify-bridge /
interface. All `done`; compile-pipeline does NOT auto-gate on
verify today (`--typed-wasm-gate` proposed in roadmap).
* Test coverage: test_tw_isolation.ml (5), E2E Boundary Verify
(3), ownership-section round-trip (3). Honest gap: no C5.1
cross-compat fixtures shipped to hyperpolymath/typed-wasm yet
(INT-12 / CONV-05; planned for Stage E).
* Multi-producer responsibilities: AffineScript = reference
producer, ephapax = second producer (same format), typed-wasm
= spec + Rust verifier + C5.1 cross-compat. ABI changes are
multi-producer; no unilateral changes.
* Stability promise: v1 layout frozen; any change requires
coordinated ADR landings across AffineScript + ephapax +
typed-wasm.
* Deliberate non-features (NF-001..NF-005) catalogued with
blockers + roadmap anchors.
This document supersedes the §"actual AS ↔ typed-wasm contract"
paragraph in ECOSYSTEM.adoc as the source of truth (ECOSYSTEM stays
the index for the spine and satellite registry). The companion
roadmap doc — what is needed to make typed-wasm natural and
optimal — lands in the next commit.
Refs CONV-01..05, INT-12
What would have to land here (and what would have to be coordinated
with hyperpolymath/typed-wasm + hyperpolymath/ephapax) for typed-
wasm to become a first-class compilation target rather than the
narrow but correct one it is today.
Adds:
- docs/specs/TYPED-WASM-ROADMAP.adoc (human)
- docs/specs/TYPED-WASM-ROADMAP.a2ml (machine-readable companion)
Structure — five tranches, ordered by what unblocks what:
Tranche A — Ergonomics (no ABI change, AffineScript-only):
A1 `--typed-wasm` compile-time flag (auto-gate)
A2 `report-typed-wasm` JSON interface descriptor
A3 extract ownership-section emission to lib/tw_ownership_section.ml
A4 diagnostic span parity for ownership errors
Tranche B — Schema hygiene (additive single-byte, ABI):
B1 ADR-020 (proposed): 0xAF sentinel + u8 version prefix on
affinescript.ownership; coordinated landing across the three
repos. Cheap now, expensive once widening lands.
Tranche C — Compiler-side foundations for L1–6 / L14–16:
C1 Region inference (NLL/Polonius) — CORE-01 Phase 3 residual
C2 Session-type / capability tracking
C3 Async-boundary recogniser — CONV-02 / ADR-016 S2..S4
C4 Capability-typed extern annotations
Tranche D — Multi-producer ABI for widening (THE big one):
D1 ADR-021 (proposed): multi-producer coordination model
D2 affinescript.regions (L1–L6 carrier)
D3 affinescript.capabilities / .session / .choreography
(L14–L16 carriers)
Tranche E — Cross-compat closure:
E1 INT-12 / CONV-05: AffineScript fixtures into typed-wasm's
crates/typed-wasm-verify/tests/cross_compat.rs (C5.1)
E2 Rust-verifier parity (out of scope here; typed-wasm-repo work)
Sequencing recommendation embedded:
A1 → A3 → A2 → E1 → B1 → A4 → D1 → C1..C4 → D2/D3 → E2
The roadmap is NOT a commitment to any timeline. It is the
ordered list of what would have to be true for the answer to
"how close to end of Stage E" to become "done".
Not a behaviour change to the compiler — pure documentation.
ADR-020 and ADR-021 are filed as PROPOSED; owner ratification
required before either lands. The work-item shells track these
in machine-readable form.
Refs CONV-01..05, INT-12, CORE-01
Files two ADRs as PROPOSED status in META.a2ml. Both require owner
ratification before they bind; neither lands code.
ADR-020 — Ownership-section schema versioning
Move affinescript.ownership from v1 (unversioned) to v2
(0xAF sentinel + u8 version + entry_count + entries). Backward-
compat dispatch: v1 readers fail cleanly on v2 sections (bad
entry-count); v2 readers see the sentinel and dispatch. v2.0
entry shape unchanged from v1 — this ADR introduces no new
fields, just version discrimination.
Why now: v1 is unversioned by accident-of-history. The first
multi-producer ABI widening (L1–6 / L14–16 carriers) will need
version discrimination; adding the version field WHILE STILL AT
V1 is cheap, retrofitting it under load is expensive.
Coordinated landing across hyperpolymath/affinescript +
hyperpolymath/typed-wasm + hyperpolymath/ephapax. Verifier ships
parse-support first; producers flip together. A deprecation
window then removes v1 parse.
ADR-021 — Multi-producer ABI coordination model
Four-axis formal model replacing today's ad-hoc cross-repo
coordination:
(1) Spec authority — OCaml verifier today; flips to
typed-wasm Rust crate on C5.1 closure (INT-12 / CONV-05).
(2) Coordinated landing protocol — verifier ships
parse-support first; producers flip together.
(3) Test parity protocol — each ABI change requires fixture
contributions to the cross-compat suite from each
producer.
(4) Conflict resolution — in-flight ABI proposals serialised
via a coordination queue owned by typed-wasm.
Why now: every prior ABI conversation has been one-off and ad-hoc;
the failure mode is parallel incompatible landings. Cost is
cheap before widening pressure arrives.
Both ADRs cross-reference docs/specs/TYPED-WASM-ROADMAP.adoc
§"Tranche B / D" which lists them as B1 / D1 work-items.
ADR-020 is itself the first test of the ADR-021 protocol — its
landing exercises the coordinated landing model.
Refs CONV-04, CONV-05, INT-12
Wires the new TYPED-WASM-INTERFACE + TYPED-WASM-ROADMAP into the
documentation lattice so every entry point reaches them:
- docs/ECOSYSTEM.adoc §"The actual AS↔typed-wasm contract": the
intro IMPORTANT block now names TYPED-WASM-INTERFACE.adoc as
authoritative formal spec, ROADMAP.adoc as the widening plan,
and ADR-020 / ADR-021 as the proposed ADRs.
- docs/CAPABILITY-MATRIX.adoc typed-wasm row: adds L13 to the
enforced-level list (was just L7+L10), links INTERFACE.adoc +
.a2ml + ROADMAP.adoc.
- docs/TECH-DEBT.adoc Stage E section header: links INTERFACE +
ROADMAP + names the two proposed ADRs.
CONV-02 / CONV-04 entries cross-reference roadmap tranches.
Section A gets DOC-13 (INTERFACE), DOC-14 (ROADMAP), DOC-15
(ADR-020/021 PROPOSED).
- docs/README.adoc §"Language Specifications": adds entries for
TYPED-WASM-INTERFACE, TYPED-WASM-ROADMAP, SETTLED-DECISIONS.
- NAVIGATION.adoc: adds "Typed-WASM interface (Stage E runway)"
subsection with both spec links.
- STATE.a2ml: session-note typed-wasm-formalisation-2026-05-23
records the spec/roadmap/ADR triad and the cross-link work.
Pure documentation. No compiler code touched.
Refs DOC-13, DOC-14, DOC-15, CONV-04
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 132 issues detected

SeverityCount
🔴 Critical13
🟠 High63
🟡 Medium56

⚠️Action Required: Critical security issues found!

View findings
[
{
"reason": "Stray AI.a2ml in root -- use 0-AI-MANIFEST.a2ml only",
"type": "banned",
"file": "AI.a2ml",
"action": "delete",
"rule_module": "root_hygiene",
"severity": "high"
},
{
"reason": "Superseded by 0-AI-MANIFEST.a2ml",
"type": "banned",
"file": "AI.djot",
"action": "delete",
"rule_module": "root_hygiene",
"severity": "high"
},
{
"reason": "Issue in quality.yml",
"type": "missing_workflow",
"file": "quality.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Issue in security-policy.yml",
"type": "missing_workflow",
"file": "security-policy.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
"type": "unpinned_action",
"file": "governance.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Action actions/checkout@v6 needs attention",
"type": "unpinned_action",
"file": "publish-jsr.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action denoland/setup-deno@v2 needs attention",
"type": "unpinned_action",
"file": "publish-jsr.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/affinescript/affinescript/affinescript-deno-test/example/smoke_driver.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/affinescript/affinescript/affinescript-deno-test/cli.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/affinescript/affinescript/affinescript-deno-test/mod.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
}
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

@hyperpolymath
hyperpolymath merged commit d4522e4 into mainMay 24, 2026
18 of 22 checks passed
@hyperpolymath
hyperpolymath deleted the claude/happy-mendel-b4IeU branch May 24, 2026 06:14
hyperpolymath pushed a commit that referenced this pull request May 24, 2026
Sixth operational finding, captured this session: when a PR is
squash-merged the squashed commit on main has a new SHA, distinct
from the source-branch commits. If you reset your local branch to
main, `git status` reports N "ahead of origin/branch" — but those
N are just main-side commits the obsolete remote-tip never saw,
not unpushed work.
Adds:
* Recognition checklist (PR closed/merged, local matches main,
remote tip is pre-merge SHA, `git log origin/<branch>..HEAD`
shows other people's work).
* Two safe fixes by intent:
git push origin --delete <branch> # done
git push --force-with-lease origin <branch> # align
* Note: --force-with-lease is safe here because there's no
unmerged remote work to clobber.
Pure documentation. Same branch / same PR shape as the previous
ops-notes commit.
Refs PR #344 (the trigger case)
hyperpolymath added a commit that referenced this pull request May 24, 2026
#348)
…erience
Captures five operational findings from the parallel-claude
coordinator-feedback turn (2026-05-24), as a single "Agent operations
notes" section:
* CI signal reliability — "PR merged" does NOT mean "build green" on
this repo today; auto-merge fires through red builds. Recently-merged
PRs (#334/#335/#336/#344) all landed with `build` red; the red persisted
until PR #346.
* Reading CI logs — WebFetch on the Actions UI returns React skeleton;
use mcp__github__pull_request_read get_check_runs / get_status, hand
back to user for actual log lines via `gh run view --log-failed`.
* Known-failing baseline checks — vscode-smoke (npm 404),
migration-assistant (fixed by #342 but stale-base branches red),
governance/Language anti-pattern policy (flags approved TS exemptions),
Hypatia 143-finding comment (mostly the same exemption hits). Don't
waste turns investigating per-PR; only investigate *changes* in this
set.
* Branching discipline — `git fetch origin main && git rebase
origin/main` immediately before push, not just at branch- creation.
Claude 1's #337 accidentally reverted #334+#335 from a stale base; cheap
to prevent.
* Test-fixture hygiene — when adding a new declaration shape (extern fn,
etc.), test it against EVERY downstream consumer
(parse/resolve/typecheck/interp/codegen). PR #346's FnExtern interp bug
survived since the interpreter was written because no test fed an inline
`extern fn` to Interp.eval_program.
Pure documentation. Zero behavioural risk.
Refs PR #346, #335, #337, #344
---------
Co-authored-by: Claude <noreply@anthropic.com>
hyperpolymath added a commit that referenced this pull request May 24, 2026
#349)
…gate)
Two `print(*r)` example fragments inside doc-comment blocks (lines 1115
and 1338) contained the literal substring `(*r`, which OCaml's lexer
treats as a nested comment opener — bringing the outer comment to depth
2 with only one matching `*)` to close it. Result: "Comment not
terminated" at EOF on every `dune build`. Marker count was 126 `(*` vs
124 `*)` (off by 2, one per offending example); after this patch it is
124 / 124.
This has blocked main's `dune build` since #335 (CORE-01 pt3 Slice A)
merged, which is why every subsequent PR (#341, #344, the open #346) has
shown `build` red regardless of its own changes. Tiny fix; high
leverage.
Fix: insert a single space inside the parens — `print( *r)` — so the
lexer sees `(` `*` `r` `)` rather than the comment-open token `(*`
followed by `r`. Reader-friendly; the example still reads the same.
No behavioural change. No code touched. Comment text only.
Diagnosed by parallel claude (INT-03 / S5 thread). Refs #335
Co-authored-by: Claude <noreply@anthropic.com>
hyperpolymath added a commit that referenced this pull request May 24, 2026
…quash) (#350)
## Summary
Recovers three doc artefacts that were dropped by PR #344's squash-merge
despite being on `claude/happy-mendel-b4IeU` when it merged:
- `.machine_readable/6a2/META.a2ml` — ADR-020 + ADR-021 records (both
`status="accepted"`, `ratified="2026-05-24"`).
- `docs/specs/TYPED-WASM-COORDINATION-LEDGER.adoc` + `.a2ml` — the
cross-repo coordination queue mandated by ADR-021. Live entry **Q-001**
(ADR-020 v1→v2 schema versioning) in state `verifier-parse-shipping`.
- `docs/TECH-DEBT.adoc` — DOC-10..16 ledger entries restored.
Cherry-picked from the original local commits (`977896c` + `243f11b`)
and squashed; the restored files are byte-identical to their pre-loss
state.
## Why this matters
- ADR-020 and ADR-021 are **owner-ratified** (2026-05-24). Their
cross-repo coordination protocol is what the `claude/tw-verify-v2-parse`
PR (incoming) lands its code under.
- Without these records on main, sister repos
(`hyperpolymath/typed-wasm`, `hyperpolymath/ephapax`) have no canonical
text to mirror.
- Cross-references from `TYPED-WASM-INTERFACE.adoc` and
`TYPED-WASM-ROADMAP.adoc` to these ADRs are currently dangling on main.
## Why zero risk
Pure documentation. No source code touched. CI surface unchanged.
## Test plan
- [ ] `dune build` clean (no source files changed)
- [ ] `dune runtest --force` baseline holds
- [ ] No new lints
Refs PR #344 (the squash-merge that lost these), ADR-020, ADR-021.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01WHUYQEPKgQU6jBgUj4snYU)_
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@hyperpolymath@claude