Extract canonical StarLang wire encoding into star-canonical-json #36
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/star-lang!36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "extract/canonical-wire-encoding"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Scope
Continue reducing prototype authority after PR #35 by moving the remaining StarLang-specific byte-producing JSON composition out of
prototype/into finalstar-canonical-json.After protocol validation became final-owned, the serializer layer can now own encoding without independently deciding payload validity.
Final serializer authority
star-canonical-jsonnow owns:The final serializer depends one-way on
star-actor-protocolfor data-contract validation and field/type interpretation. There is no compiler/runtime dependency and no cycle.One-authority prototype reduction
prototype/canonical-json-prototype.lispis reduced to compatibility delegates plus protocol helper aliases still used by binding/domain prototype code.prototype/message-lifecycle-prototype.lispno longer owns lifecycle JSON composition;canonical-lifecycle-envelope-jsonis a thin final-package delegate.Extraction metrics
CI on final head
7fae4caa3a69a4d96f60b7c27683fce6b3dd2701reports:prototype/**/*.lisp: 19,327 → 19,077 LOC (-250)prototype/canonical-json-prototype.lisp: net -172prototype/message-lifecycle-prototype.lisp: net -78Exact behavior preserved
This slice does not redesign canonicalization. It preserves the existing:
No float/RFC8785/Ryu work from issue #5 is included.
Validation
GitHub Actions and Nix are green:
star-canonical-jsongeneric tests ✅asdf:test-system :starlang-prototype✅ — 34 standalone scriptsDispatcher note
A live-code audit corrected an earlier assumption:
dispatcher-idempotency-identity-prototype.lispcurrently computes semantic identity structurally by selecting stable command fields; it does not canonicalize identity through JSON. Therefore this serializer extraction is an independent one-authority cleanup, not an idempotency prerequisite.Next slice
Deterministic wire dispatch is ready to move into
starlang-runtime. Absorb the existing structural semantic-idempotency wrapper and deferred-completion behavior into one final implementation. Preserve the distinct dispatcher work queue; do not replace it with per-actorstar-mailboxsemantics.