Skip to content

chore(rescript): remove the 4 orphan .res files + the affine-res package#293

Merged
hyperpolymath merged 1 commit into
mainfrom
delete-res-baseline-rot
May 20, 2026
Merged

chore(rescript): remove the 4 orphan .res files + the affine-res package#293
hyperpolymath merged 1 commit into
mainfrom
delete-res-baseline-rot

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

  • Removes the 4 ReScript .res files that have been failing the governance / Language / package anti-pattern policy check on every PR for some time, plus the orphan wrapper package they live in:
    • packages/affine-res/{README.adoc, rescript.json, src/AffineScript.res, AffineScript.resi, AffineScriptValue.res} — the whole affine-res ReScript-bindings package goes because the .res sources are the only thing in it; the README/rescript.json/.resi can't function without them. Same precedent as packages/affine-ts/ (removed 2026-05-11, won't-do per [Repo] Auto-generate packages/affine-{js,ts}/types.d.ts from compiler output #66) — non-AffineScript consumer-binding packages aren't first-class here.
    • affinescriptiser/examples/SafeDOMExample.res + examples/SafeDOMExample.res — duplicate ReScript example. Live .affine examples (examples/effects.affine, ownership.affine, etc.) cover the same ground.
  • No other tracked code references affine-res / AffineRes / the example paths (verified via repo-wide grep across .yml/.adoc/.json/.toml/.affine/.ml/.mli/.rs/.sh/Justfile). The historical roadmap status doc docs/reports/AFFINESCRIPT-ROADMAP-STATUS-2026-04-13.md is left intact as a 2026-04-13 snapshot.

Effect

find . -name '*.res' | grep -v node_modules now returns empty — exactly what the governance script asserts. The check should flip from FAILURE to ✅ on this PR and stop polluting every subsequent PR's CI.

Test plan

  • No tracked .res/.resi left: git ls-files '*.res' '*.resi' → empty
  • No tooling/source references: grep -rn "affine-res\|AffineRes\b" --include=... → empty
  • CI: governance / Language / package anti-pattern policy should pass on this PR
  • CI: build/lint/Hypatia/etc. should remain green — these files were never linked into dune/Cargo/the CLI

Closes the recurring baseline-rot failure called out on PRs #291 and #292.

🤖 Generated with Claude Code

Removes the ReScript baseline rot that's been failing the
governance / Language / package anti-pattern policy check on every PR:

- packages/affine-res/{README.adoc,rescript.json,src/AffineScript.res,
  AffineScript.resi,AffineScriptValue.res} — orphan ReScript bindings
  package. The whole directory goes because the .res sources are the
  only thing it contains; the README + rescript.json + .resi cannot
  function without them.  Same precedent as packages/affine-ts/
  (removed 2026-05-11, issue #66 closed won't-do): non-AffineScript
  consumer-binding packages aren't first-class in the AffineScript
  repo — TS callers were told to use @hyperpolymath/affine-js
  directly, ReScript callers should do likewise.
- affinescriptiser/examples/SafeDOMExample.res and
  examples/SafeDOMExample.res — duplicate ReScript example.  No
  ReScript-equivalent in the AffineScript stdlib examples bench was
  rebuilt; the equivalent live .affine examples (e.g.
  examples/effects.affine, ownership.affine) cover the same ground.

No other tracked code references `affine-res`, `AffineRes`, or these
example paths (verified via repo-wide grep across .yml/.adoc/.json/
.toml/.affine/.ml/.mli/.rs/.sh/Justfile).  The historical roadmap
status doc docs/reports/AFFINESCRIPT-ROADMAP-STATUS-2026-04-13.md
mentions affine-res as a 2026-04-13 snapshot checkbox; left intact as
history.

Effect: `find . -name '*.res' | grep -v node_modules` returns empty,
which is exactly what the governance script asserts.  No regressions
in the build (these files were never linked into dune / Cargo / the
CLI).

Refs the cross-PR triage on #291, #292 where the same failing check
was diagnosed as baseline rot.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 40 issues detected

Severity Count
🔴 Critical 12
🟠 High 16
🟡 Medium 12

⚠️ 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@v4 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 daa7244 into main May 20, 2026
16 checks passed
@hyperpolymath hyperpolymath deleted the delete-res-baseline-rot branch May 20, 2026 06:37
hyperpolymath added a commit that referenced this pull request May 20, 2026
…JSR publish (#303)

INT-04 and INT-10 were both marked DONE in TECH-DEBT, but the wording
predated the actual JSR publish:

  - INT-04 line said "JSR publish authorised + dispatched (owner go
    2026-05-19)" — speculative; the real first-time publish landed
    2026-05-20 (six dispatched runs through the scope/package/trusted-
    publisher/SPDX-licence/.d.ts/cross-runtime gates).
  - INT-10 said DONE but didn't note the LSP's shim-resolution path
    only became *executable* after today's publish (code was correct
    but inert against a 404 JSR URL).

Updates
- docs/TECH-DEBT.adoc — INT-04 + INT-10 lines reflect the live publish,
  with explicit note that @hyperpolymath/affine-js + affinescript-tea
  remain dry-run-OK / not-yet-dispatched.
- docs/PACKAGING.adoc — JSR-publishable table now has 3 rows with a
  Status column; @hyperpolymath/affinescript row records the LIVE
  0.1.2 (2026-05-20) state, cross-runtime carve-out, MPL-2.0 licence
  pointer.  New "First-time JSR publish gotchas" subsection captures
  the five gates that fail one at a time (scope claim, package create,
  trusted GH repo link, SPDX licence, sibling .d.ts + triple-slash
  reference) — dry-run misses gates 2 + 3 so they cost a round-trip.
- .machine_readable/6a2/STATE.a2ml — new session-note-2026-05-20
  following the existing `session-note-YYYY-MM-DD = "…"` convention,
  capturing every landed PR (#291/#292/#293/#294/#295/#298/#299) and
  the estate macos-13 sweep (casket-ssg#8, proven#29, repos-monorepo#9),
  plus the open follow-up tickets (#297/#300, #301, #302).  This file
  is the STATE.a2ml mirror, not the lead; TECH-DEBT.adoc is the spine.

No code change.  TECH-DEBT update protocol calls for ledger + STATE
mirror in lockstep; PACKAGING is the human-facing companion.  Memory
entries (`reference_macos_13_runner_retired`,
`reference_estate_gitbot_auto_closes_on_refs`,
`reference_estate_mirror_state_2026_05_20`,
`reference_jsr_publish_recipe`) live in `~/.claude/projects/.../memory/`
and are out of repo scope.

Refs #282 (closed), #301, #302, #297, #300.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to 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.

1 participant