fix: plain clone works fully + Deno container (Refs affinescript#122)#32
Closed
hyperpolymath wants to merge 3 commits into
Closed
fix: plain clone works fully + Deno container (Refs affinescript#122)#32hyperpolymath wants to merge 3 commits into
hyperpolymath wants to merge 3 commits into
Conversation
rsr-antipattern forbids `.ts` in src/ (src/ is not allowlisted). All four src/*.ts removed: - **storage.ts → storage.affine → storage.js** (the AffineScript showcase for affinescript#122's Deno-ESM backend). storage.affine is the source of truth; storage.js is generated, drop-in, dependency-free ESM — exact surface `export class ExperienceStorage` (constructor + 9 async methods) consumed by index.js / mapper.js / privacy.js / visualize.js. Self-contained extern decls lowered by the backend (Deno.*Sync / JSON.* / object indexing); real AffineScript helpers (has_json_ext / drop_json_ext); try/catch; orDefault preserves the `new ExperienceStorage()` default; kbString for the KB display. Regenerate: `affinescript compile src/storage.affine -o src/storage.js --deno-esm`. - **observability.ts / rescript-bridge.ts / wasm-bridge.ts → .js**: faithful plain-ESM type-strips. These are pure JS-runtime / ReScript-interop / WebAssembly-runtime glue (no algorithm; wasm-bridge has no importers in src|tests). AffineScript is the wrong tool for them and porting rescript-bridge would re-implement a ReScript bridge against the estate ReScript-hands-off rule; type-stripping keeps behaviour byte-identical and the boundary intact. Consumers already import `./storage.js` etc. (no `.ts` specifiers) — no call-site changes needed. Verification: the AffineScript toolchain (affinescript#123 + the follow-up polymorphic-len/show fix, affinescript#125) compiles storage.affine cleanly to the exact expected class surface; affinescript `dune runtest` + the Deno-ESM harness suite are green. `deno task test` is left to ubicity CI (no usable local deno in the dev env). Closes #30. Refs hyperpolymath/affinescript#122, #123, #125. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
…t#122, ubicity#30) Follow-up to #31. After the .ts elimination the repo did not run from a clean clone: (1) src/storage.js was generated before the async-IIFE codegen fix (affinescript#126) so it was a SyntaxError; (2) deno.json declared npm:zod with no nodeModulesDir; (3) src/{export,import,capture, mapper,privacy}.js used bare node-builtin specifiers deno rejects; (4) deno.json tasks + exports still pointed at deleted .ts entrypoints; (5) .tool-versions had no deno; (6) Containerfile was a stale Node image that cannot run this Deno project. - Regenerated src/storage.js with the fixed (async-IIFE) backend. - deno.json: exports->index.js, nodeModulesDir auto, all task/glob .ts entrypoints -> .js. - node: prefix on the 5 bare builtin imports. - .tool-versions: pin deno 2.7.14 (matches CI / flake.nix). - Containerfile + docker-compose rewritten on denoland/deno:2.7.14; .dockerignore keeps tests/ so the image can run the suite. deno task test: 44 passed / 0 failed locally. Container build + in- container suite verified (see PR thread). Refs hyperpolymath/affinescript#122 #126, ubicity#30. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Caught by the in-container deno cache (whole graph from index.js, stricter than deno test which only loads test-reached modules): src/capture.js readline/promises and src/performance.js perf_hooks still lacked the node: prefix. docker-compose build now names Containerfile explicitly so docker (not just podman) finds it. Verified: docker build -f Containerfile -> clean; in-container deno test = 44 passed / 0 failed; default CMD (CLI help) works.
Owner
Author
|
Superseded by a clean single-commit branch (stale branch history made #32 un-mergeable though the content applies cleanly to main). |
hyperpolymath
added a commit
that referenced
this pull request
May 19, 2026
…#51) #3 isolated pass (pilot #32-shape). Scaffold-placeholder leak per `standards/LICENCE-POLICY.adoc` **A5** — NOT relicensing. -> `PMPL-1.0-or-later`. **3 file(s).** Isolated mode (if dirty) stages ONLY placeholder lines; repo WIP untouched. Gates: per-file clean check, diff-shape asserted, auto-revert on anomaly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make a plain clone work fully + Deno container (Refs affinescript#122, #126; ubicity#30)
Follow-up to #31. After the
.tselimination the repo did not run froma clean clone. This makes it work end-to-end, including containerised.
Fixes
src/storage.jsregenerated with the fixed async-IIFE backend(affinescript#126). The version merged in Eliminate all src/*.ts (Closes #30; Refs affinescript#122) #31 was generated before
that fix, so
loadAllExperienceswas aSyntaxError(
awaitinside a non-async IIFE).deno.json:exports→./src/index.js; added"nodeModulesDir": "auto"(npm:zod had no resolution); every task /glob
.tsentrypoint (cli/capture/visualize/index) →.js(they were deleted in Eliminate all src/*.ts (Closes #30; Refs affinescript#122) #31).
node:prefix on all bare node-builtin imports deno rejects:export/import(fs),capture(process,readline/promises),mapper/privacy(crypto),performance(perf_hooks)..tool-versions: pindeno 2.7.14(matches CIsetup-denoand
flake.nix) so anasdf/miseclone provisions deno.denoland/deno:2.7.14(was a staleNode image that cannot run this Deno project);
.dockerignorekeeps
tests/so the image can run the suite;docker-compose.ymlnames
Containerfileexplicitly sodocker compose(not justpodman) finds it.
Verification
deno task test→ 44 passed / 0 failed.docker build -f Containerfile -t ubicity .→ buildsclean;
docker run --rm ubicity test --allow-read --allow-write tests/→ 44 passed / 0 failed; default CMD (CLI help) works.git clonenow works fully via: host deno (.tool-versions/
flake.nixboth provide 2.7.14) or the container.flake.nixalready provided deno (unchanged). storage.affine remainsthe source of truth for storage.js (affinescript#122 showcase).
Refs hyperpolymath/affinescript#122 #126, ubicity#30.
🤖 Generated with Claude Code