Close the Star-Lang file loader boundary #42

Merged
lost-rob0t merged 1 commit from agent/issue-41-closed-star-loader-a4c7 into main 2026-07-25 16:13:32 +00:00
lost-rob0t commented 2026-07-25 15:12:04 +00:00 (Migrated from github.com)

Hey GPT-5.6 here.

Closes #41.

Scope

  • replace the implementation-language reader at the .star boundary with an explicit closed Star-Lang parser
  • accept comments and ordinary whitespace while requiring exactly one spec-library
  • reject Common Lisp dispatch/quotation syntax, dotted lists, package-qualified names, malformed input, and unknown option keywords
  • keep source identifiers as strings so rejected attacker-controlled identifiers are never interned
  • compile through compile-spec-library and return validated normalized IR
  • preserve structured condition classes while adding pathname, line, and column context
  • keep remote import resolution and all network access out of scope
  • update STAR-LANG-RESEARCH-008 and the Star-Lang research index; no implementation design was selected or promoted

TDD evidence

RED, after adding the acceptance tests:

sbcl --script prototypes/star-lang/common-lisp/core-surface-tests.lisp

Exited 1 because the old load-star-form returned a raw reader form, which reached compile-actor and failed as a malformed property list. This directly reproduced the loader-boundary defect.

GREEN:

  • sbcl --script prototypes/star-lang/common-lisp/core-surface-tests.lisp — passed
  • sbcl --script prototypes/star-lang/common-lisp/core-semantics-tests.lisp — passed
  • sbcl --script prototypes/star-lang/common-lisp/star-loader-tests.lisp — passed

Acceptance coverage includes the existing fixture and exact direct-compiler IR equality; comments/whitespace; empty and multiple forms; wrong top level; malformed lists/strings; #., #S, #P, and vector dispatch; package-qualified symbols; duplicate declarations; invalid fields/types; source positions; and package-symbol-count stability.

Full validation

The complete repository-supported Star-Lang Common Lisp workflow passed:

  • core surface and core semantics
  • specification domains and compiler IR
  • canonical JSON bindings
  • message lifecycle and deterministic dispatcher
  • execution modes, transport outbox, CL gserver runtime, and Star loader
  • JSON fixtures, Python syntax validation, four dispatcher traces, and seven transport traces

Additional required checks:

  • git diff --check — passed
  • python scripts/sync.py --check — roam structure and ledgers are valid
  • bash scripts/publish-pages — published 39 Org-roam pages
  • python3 scripts/check-pages-links.py _site — checked 43 HTML pages; all internal links resolve
  • python3 -m py_compile scripts/build_epub.py — passed
  • bash scripts/build-epub — built from 39 notes
  • EPUBCheck 5.3.0 — 0 fatals, errors, warnings, or infos

Architecture and risk

The active design remains QUASAR-002-clog-hybrid-prototype, status IMPLEMENTING, and is untouched. The parser is intentionally closed and uses a fixed option vocabulary. Remote/digest-locked resolution remains a separate bounded phase. Compiler semantic failures inherit source positions recorded on parsed list nodes.

Branch: agent/issue-41-closed-star-loader-a4c7
Commit: 237445861d2d9984a7dde135d1f2a0908d505bce

No merge or auto-merge requested.

Hey GPT-5.6 here. Closes #41. ## Scope - replace the implementation-language reader at the `.star` boundary with an explicit closed Star-Lang parser - accept comments and ordinary whitespace while requiring exactly one `spec-library` - reject Common Lisp dispatch/quotation syntax, dotted lists, package-qualified names, malformed input, and unknown option keywords - keep source identifiers as strings so rejected attacker-controlled identifiers are never interned - compile through `compile-spec-library` and return validated normalized IR - preserve structured condition classes while adding pathname, line, and column context - keep remote import resolution and all network access out of scope - update STAR-LANG-RESEARCH-008 and the Star-Lang research index; no implementation design was selected or promoted ## TDD evidence RED, after adding the acceptance tests: `sbcl --script prototypes/star-lang/common-lisp/core-surface-tests.lisp` Exited 1 because the old `load-star-form` returned a raw reader form, which reached `compile-actor` and failed as a malformed property list. This directly reproduced the loader-boundary defect. GREEN: - `sbcl --script prototypes/star-lang/common-lisp/core-surface-tests.lisp` — passed - `sbcl --script prototypes/star-lang/common-lisp/core-semantics-tests.lisp` — passed - `sbcl --script prototypes/star-lang/common-lisp/star-loader-tests.lisp` — passed Acceptance coverage includes the existing fixture and exact direct-compiler IR equality; comments/whitespace; empty and multiple forms; wrong top level; malformed lists/strings; `#.`, `#S`, `#P`, and vector dispatch; package-qualified symbols; duplicate declarations; invalid fields/types; source positions; and package-symbol-count stability. ## Full validation The complete repository-supported Star-Lang Common Lisp workflow passed: - core surface and core semantics - specification domains and compiler IR - canonical JSON bindings - message lifecycle and deterministic dispatcher - execution modes, transport outbox, CL gserver runtime, and Star loader - JSON fixtures, Python syntax validation, four dispatcher traces, and seven transport traces Additional required checks: - `git diff --check` — passed - `python scripts/sync.py --check` — `roam structure and ledgers are valid` - `bash scripts/publish-pages` — published 39 Org-roam pages - `python3 scripts/check-pages-links.py _site` — checked 43 HTML pages; all internal links resolve - `python3 -m py_compile scripts/build_epub.py` — passed - `bash scripts/build-epub` — built from 39 notes - EPUBCheck 5.3.0 — 0 fatals, errors, warnings, or infos ## Architecture and risk The active design remains `QUASAR-002-clog-hybrid-prototype`, status `IMPLEMENTING`, and is untouched. The parser is intentionally closed and uses a fixed option vocabulary. Remote/digest-locked resolution remains a separate bounded phase. Compiler semantic failures inherit source positions recorded on parsed list nodes. Branch: `agent/issue-41-closed-star-loader-a4c7` Commit: `237445861d2d9984a7dde135d1f2a0908d505bce` No merge or auto-merge requested.
Sign in to join this conversation.
No description provided.