Skip to content

Commit e5fdb53

Browse files
Merge branch 'main' into fix/issue-42-extern-parsing
2 parents e8eb463 + fb34c66 commit e5fdb53

81 files changed

Lines changed: 4142 additions & 1379 deletions

Some content is hidden

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

.build/dune-project

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
(cmdliner (>= 1.2))
3737
(yojson (>= 2.1))
3838
(alcotest (and (>= 1.7) :with-test))
39-
(odoc (and (>= 2.4) :with-doc)))
39+
(odoc (and (>= 2.4) :with-doc))
40+
(js_of_ocaml (>= 5.0))
41+
(js_of_ocaml-ppx (>= 5.0))
42+
(ocamlformat (and (>= 0.26) :with-test)))
4043
(tags
4144
(programming-language compiler webassembly affine-types dependent-types row-polymorphism effects ocaml)))

.claude/CLAUDE.md

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,20 @@ Both are FOSS with independent governance (no Big Tech).
7070

7171
### TypeScript Exemptions (Approved)
7272

73-
The "no new TypeScript" rule has nine approved exemptions in this repo. These paths are *not* policy violations — they are documented carve-outs because the file format or downstream consumer requires TypeScript:
73+
The "no new TypeScript" rule has seven approved exemptions in this repo. These paths are *not* policy violations — they are documented carve-outs because the file format or downstream consumer requires TypeScript:
7474

7575
| Path | Files | Rationale | Unblock condition |
7676
|---|---|---|---|
7777
| `packages/affine-js/types.d.ts` | 1 | TypeScript declaration file — the public API contract by which JS callers consume AffineScript-compiled artefacts. `.d.ts` is TS by definition. | Generate from canonical compiler output (issue: see ROADMAP). |
78-
| `packages/affine-ts/types.d.ts` | 1 | Same, for TS callers. | Same as above. |
79-
| `editors/vscode/src/extension.ts` | 1 | VS Code extension entry point. Path pinned by `package.json`'s `main` field. | AffineScript issue #35 (Node-target codegen). |
8078
| `affinescript-deno-test/*.ts` | 6 | Deno-based test harness for AffineScript itself: `cli.ts`, `mod.ts`, `lib/{compile,discover,runner}.ts`, `example/smoke_driver.ts`. Deno test runner is TS-native. | AffineScript stdlib + Deno bindings (no scheduled issue). |
8179

8280
Adding to this list requires explicit user approval and an unblock condition. New TypeScript files outside this list are still banned per the policy table above.
8381

84-
The 5 external references to `affinescript-deno-test/` (CI workflow, status docs, history docs) and the 3 references to `packages/affine-{js,ts}/` (status docs, Deno config) are why physical relocation into a `vendor/` subtree was rejected — the relocation cost exceeded the visibility benefit when the directories are already named clearly.
82+
**Closed exemptions:**
83+
- `editors/vscode/src/extension.ts` — closed 2026-05-03 by issue #35 Phase 3 (Node-target codegen + Vscode bindings landed). Source of truth is now `editors/vscode/src/extension.affine`, compiled to `out/extension.cjs`. Re-introducing the .ts file is blocked by `tools/check-no-extension-ts.sh` (wired into `just check` and `.github/workflows/ci.yml`).
84+
- `packages/affine-ts/` — removed 2026-05-11 (issue #66 closed won't-do). TypeScript is not a first-class consumer; TS callers should use `@hyperpolymath/affine-js` directly and supply their own typings.
85+
86+
The 5 external references to `affinescript-deno-test/` (CI workflow, status docs, history docs) and the references to `packages/affine-js/` (status docs, Deno config) are why physical relocation into a `vendor/` subtree was rejected — the relocation cost exceeded the visibility benefit when the directories are already named clearly.
8587

8688
### Package Management
8789

@@ -97,3 +99,32 @@ The 5 external references to `affinescript-deno-test/` (CI workflow, status docs
9799
- SHA-pinned dependencies
98100
- SPDX license headers on all files
99101

102+
## Hypatia and gitbot-fleet standing rules
103+
104+
Standing governance rules for the Hypatia review bot and the gitbot-fleet
105+
auto-merge bot. These are estate-wide policies; this section is the canonical
106+
copy that bots read at PR-review time. Keep this section standalone so it can
107+
be read cold without requiring the rest of CLAUDE.md as context.
108+
109+
### DOC-FORMAT
110+
Rule: All documentation files in docs/ must use .adoc extension.
111+
Exception: GitHub community-health files must use .md by name (CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, CHANGELOG.md, README.md).
112+
Action (Hypatia): On any PR that adds or renames a docs/ file with .md extension (excluding the above exceptions), post a review comment requesting rename to .adoc and request-changes.
113+
Action (gitbot): Reject auto-merge for any PR with a docs/ .md file that is not a community-health file name.
114+
115+
### DOC-DEDUP
116+
Rule: Before creating a new docs/specs/*.adoc or adding a major new section to SPEC.adoc, search existing specs for overlapping coverage.
117+
Action (Hypatia): On any PR that closes the same issue number as another open PR, post a comment listing both PRs and ask the author to confirm which is canonical.
118+
Action (gitbot): Block merge if two open PRs share a "Closes #N" reference to the same issue.
119+
120+
### STACK-SIGNAL
121+
Rule: A docs PR that documents a feature implemented in a sibling feature PR must declare the dependency in its PR body.
122+
Format: Add a line "Depends on: #NNN" near the top of the PR body.
123+
Action (Hypatia): On any docs PR whose title or body references types/grammar/syntax added in an open feat PR, check whether "Depends on:" is present; if missing, request it.
124+
Action (gitbot): Do not auto-merge a PR with "Depends on: #NNN" until #NNN is merged.
125+
126+
### ISSUE-CLOSURE
127+
Rule: An issue is closed only by explicit merge of a PR with "Closes #N" OR by explicit human comment agreement in the issue thread. bots may not self-close issues.
128+
Action (Hypatia): When asked to close an issue, confirm via a reply on the issue thread before doing so.
129+
Action (gitbot): Never use GitHub's "close issue" API directly; only close via PR merge with "Closes #N" keywords.
130+

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ jobs:
4343
- name: Run face-transformer regression tests
4444
run: opam exec -- ./tools/run_face_transformer_tests.sh
4545

46+
- name: Issue #35 Phase 3 — block extension.ts regression
47+
# The vscode extension is now authored in extension.affine and
48+
# compiled to extension.cjs. Re-introducing extension.ts would
49+
# silently drift the source-of-truth back to TypeScript, which
50+
# the policy forbids. See tools/check-no-extension-ts.sh for
51+
# rationale + recovery instructions.
52+
run: ./tools/check-no-extension-ts.sh
53+
4654
- name: Check formatting
4755
run: opam exec -- dune build @fmt
4856

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ jobs:
3131
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3232

3333
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@e46ed2cbd01164d986452f91f178727624ae40d7 # v3.28.1
34+
uses: github/codeql-action/init@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v3.28.1
3535
with:
3636
languages: ${{ matrix.language }}
3737
build-mode: ${{ matrix.build-mode }}
3838

3939
- name: Perform CodeQL Analysis
40-
uses: github/codeql-action/analyze@e46ed2cbd01164d986452f91f178727624ae40d7 # v3.28.1
40+
uses: github/codeql-action/analyze@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v3.28.1
4141
with:
4242
category: "/language:${{ matrix.language }}"

.github/workflows/hypatia-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
echo "- Medium: $MEDIUM" >> $GITHUB_STEP_SUMMARY
8787
8888
- name: Upload findings artifact
89-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
89+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
9090
with:
9191
name: hypatia-findings
9292
path: hypatia-findings.json

.github/workflows/scorecard-enforcer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
publish_results: true
3131

3232
- name: Upload SARIF
33-
uses: github/codeql-action/upload-sarif@e46ed2cbd01164d986452f91f178727624ae40d7 # v3
33+
uses: github/codeql-action/upload-sarif@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v3
3434
with:
3535
sarif_file: results.sarif
3636

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ jobs:
2727
results_format: sarif
2828

2929
- name: Upload results
30-
uses: github/codeql-action/upload-sarif@e46ed2cbd01164d986452f91f178727624ae40d7 # v3.31.8
30+
uses: github/codeql-action/upload-sarif@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v3.31.8
3131
with:
3232
sarif_file: results.sarif

.github/workflows/semgrep.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
3030

3131
- name: Upload SARIF
32-
uses: github/codeql-action/upload-sarif@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
32+
uses: github/codeql-action/upload-sarif@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
3333
with:
3434
sarif_file: semgrep.sarif
3535
if: always()

.github/workflows/stdlib-naming.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
enforce-lowercase-stdlib:
2525
runs-on: ubuntu-latest
2626
steps:
27-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
27+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2828

2929
- name: Enforce lowercase .affine filenames in stdlib/
3030
run: |

.machine_readable/6a2/META.a2ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,5 +667,5 @@ consequences = """
667667
"""
668668
references = [
669669
"docs/DESIGN-VISION.adoc (faces section)",
670-
"docs/specs/faces.md (to be written)",
670+
"docs/specs/faces.adoc",
671671
]

0 commit comments

Comments
 (0)