Skip to content

Commit 7f7f707

Browse files
Merge pull request #60 from hyperpolymath/fix/ci-corrective
fix(ci): eject rattlescript subtree, document TS exemptions (round 3)
2 parents 4b73288 + 116ea5d commit 7f7f707

959 files changed

Lines changed: 266 additions & 108268 deletions

File tree

Some content is hidden

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

.claude/CLAUDE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,21 @@ Both are FOSS with independent governance (no Big Tech).
6868
5. **Python only for SaltStack** - All other Python must be rewritten
6969
6. **No Kotlin/Swift for mobile** - Use Tauri 2.0+ or Dioxus
7070

71+
### TypeScript Exemptions (Approved)
72+
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:
74+
75+
| Path | Files | Rationale | Unblock condition |
76+
|---|---|---|---|
77+
| `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). |
80+
| `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). |
81+
82+
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.
83+
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.
85+
7186
### Package Management
7287

7388
- **Primary**: Guix (guix.scm)

.github/workflows/hypatia-scan.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ jobs:
1717
scan:
1818
name: Hypatia Neurosymbolic Analysis
1919
runs-on: ubuntu-latest
20+
env:
21+
# ${{ env.HOME }} is empty in working-directory context (HOME is not in
22+
# env unless explicitly set), which makes the directory resolve to "/hypatia"
23+
# and the build step fails with "No such file or directory". A job-level env
24+
# var is visible to both shell ($HYPATIA_DIR) and Actions expressions
25+
# (${{ env.HYPATIA_DIR }}).
26+
HYPATIA_DIR: /home/runner/hypatia
2027

2128
steps:
2229
- name: Checkout repository
@@ -32,12 +39,12 @@ jobs:
3239

3340
- name: Clone Hypatia
3441
run: |
35-
if [ ! -d "$HOME/hypatia" ]; then
36-
git clone https://github.com/hyperpolymath/hypatia.git "$HOME/hypatia"
42+
if [ ! -d "$HYPATIA_DIR" ]; then
43+
git clone https://github.com/hyperpolymath/hypatia.git "$HYPATIA_DIR"
3744
fi
3845
3946
- name: Build Hypatia scanner (if needed)
40-
working-directory: ${{ env.HOME }}/hypatia
47+
working-directory: ${{ env.HYPATIA_DIR }}
4148
run: |
4249
if [ ! -f hypatia-v2 ]; then
4350
echo "Building hypatia-v2 scanner..."
@@ -52,7 +59,7 @@ jobs:
5259
echo "Scanning repository: ${{ github.repository }}"
5360
5461
# Run scanner
55-
HYPATIA_FORMAT=json "$HOME/hypatia/hypatia-cli.sh" scan . > hypatia-findings.json
62+
HYPATIA_FORMAT=json "$HYPATIA_DIR/hypatia-cli.sh" scan . > hypatia-findings.json
5663
5764
# Count findings
5865
FINDING_COUNT=$(jq '. | length' hypatia-findings.json 2>/dev/null || echo 0)

README.adoc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,14 @@ A face is not a separate language. It is a different presentation layer over the
7878

7979
The established faces are:
8080

81-
- *AffineScript* — the canonical face
82-
- *JaffaScript* — a JavaScript / TypeScript-like face
83-
- *RattleScript* — a Python-like face (also positioned as "Python for the web" via typed-wasm)
84-
- *PseudoScript* — a pseudocode-oriented face for CS pedagogy
85-
- *LucidScript* — a PureScript / Haskell-like face
86-
- *CafeScripto* — a CoffeeScript-like face
81+
- *AffineScript* — the canonical face (this repo)
82+
- link:https://github.com/hyperpolymath/jaffascript[*JaffaScript*] — a JavaScript / TypeScript-like face
83+
- link:https://github.com/hyperpolymath/rattlescript[*RattleScript*] — a Python-like face (also positioned as "Python for the web" via typed-wasm)
84+
- link:https://github.com/hyperpolymath/pseudoscript[*PseudoScript*] — a pseudocode-oriented face for CS pedagogy
85+
- link:https://github.com/hyperpolymath/lucidscript[*LucidScript*] — a PureScript / Haskell-like face
86+
- link:https://github.com/hyperpolymath/cafescripto[*CafeScripto*] — a CoffeeScript-like face
87+
88+
The five non-canonical face repos are *brand surfaces only* — examples, docs, and a thin shim that defaults `--face`. The compiler, type checker, borrow checker, and codegen all live here in `affinescript`.
8789

8890
Every face shares the canonical `.affine` file extension; the active face is selected by an optional `face:` pragma on the first comment line of the file (e.g. `# face: rattlescript`, `// face: jaffascript`, `-- face: lucidscript`), or by `--face NAME` on the CLI.
8991

0 commit comments

Comments
 (0)