Skip to content

feat: preserve shared boundary contracts through compilation and runtime - #9048

Merged
marsninja merged 35 commits into
jaseci-labs:mainfrom
marsninja:feat/shared-boundary-contracts
Sep 7, 2026
Merged

feat: preserve shared boundary contracts through compilation and runtime#9048
marsninja merged 35 commits into
jaseci-labs:mainfrom
marsninja:feat/shared-boundary-contracts

Conversation

@marsninja

@marsninja marsninja commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Shared boundary contracts implementation

Jac will retain boundary contracts across compilation and deployment, use them for typed crossings and runtime dependency decisions, and migrate jaclang_org to those mechanisms. Superseded implementations will be removed rather than retained as compatibility paths.

Status Scope item Completion requirement
Implemented Typed Wasm exports and generated calls Native declarations drive ordinary typed imports and generated invocation.
Implemented Value conversions and opaque handles Runtime adapters preserve declared values and manage native handles without application integer casts.
Implemented Checked host-import interfaces Required host signatures check implementations and drive registration.
Implemented Module loading and host registration Shared runtime owns instantiation, readiness, registration, and cleanup.
Implemented Precise CLI and authentication boundary types Consumers use declared records instead of dynamic field reconstruction.
Implemented External API contracts and response validation Declared external shapes drive clients and validate responses.
Implemented Conservative effect analysis Separate read/write dependencies and explicit unknown effects compose through calls.
Implemented Wildcard dependency matching Reader and writer wildcards conservatively overlap.
Implemented Concurrent cache operations Writes prevent older reads from being cached or reused as fresh results.
Implemented Qualified endpoint identities App/module/declaration identities survive generation, routing, and cache metadata.
Implemented Reusable WebGL graphics adapter Browser graphics implementation lives behind the shared host contract.
Implemented Application migration and removal of scaffolding jaclang_org consumes the shared mechanisms; redundant paths are removed.
Implemented; verification waived Boundary audit Compiler exposes contracts, placement, effects, and unchecked assumptions.

Acceptance validation

Validated jaclang_org with jac browse in development mode: home and source explorer rendering, native arena rendering with updating health/death counters, navigation to JacYac, local signup and automatic login, post creation/deletion with feed and trending updates, logout, and docs navigation. The validation post was deleted. The GitHub project flow decoded public repository and commit responses and correctly rejected a repository containing no Jac code. No application console errors were observed in these flows.

The final production smoke check used the CI-built binary: the home page rendered, the native arena launched with updating health/death counters, and navigation to JacYac rendered its login screen without application console errors. CI is green on the final commit, including compiler, runtime, client, Android, deployment, Kubernetes, and packaging checks. The packaging smoke test exercised full browser journeys against both colocated services and the fleet gateway, plus fullstack create/eject checks.

No benchmarks were run. Boundary-audit verification remains waived; browser validation does not establish exhaustive cache-race, ABI, or external OAuth coverage.

Implementation notes

  • Native declarations generate scalar/ownership contracts and host registration; scalar widths and ranges come from the central registry. The shared WebGL adapter replaces application-owned ABI wiring; the old set_na_env API is removed.
  • Endpoint identities survive generated calls, routing, cache metadata, and compiler artifacts. Browser/React caches share invalidation and concurrent-read handling. Unknown effects disable caching; declared effects remain visible assumptions.
  • Production bundles and client test harnesses include the runtime dependency graph. Signup and CLI consumers use declared records. External GitHub responses use typed contracts with response validation.
  • Client artifact format 3 and compiler cache format 25 replace their predecessors. Boundary metadata is retained in artifacts and collected into the production audit.

All implementation items are committed. The repository progress document has been removed; this PR description retains the scope table. The audit verification waiver is a validation limitation, not a claim that the final audit output was checked.

@marsninja
marsninja marked this pull request as ready for review September 7, 2026 18:06
@marsninja
marsninja merged commit 0e3499b into jaseci-labs:main Sep 7, 2026
29 checks passed
chess10kp added a commit to chess10kp/jaseci that referenced this pull request Sep 8, 2026
Absorb 147 upstream commits (Aug 25..Sep 8): centralize Jac object
semantics and native compiler migration foundations (jaseci-labs#9022), shared
boundary contracts through compilation and runtime (jaseci-labs#9048), comptime
imports, workspace apps, native frontend materialization.

Conflict resolutions: unitree Import/Complex nodes follow upstream's
migrated shape with the campaign clib_header param restored (decl +
roles.impl woven init); uni_pass visitor surface dropped with
upstream's native dispatch; client compile internals, runtime anchor
resolution, modresolver spec probing, HMR classify take upstream's
refactors; campaign hooks preserved (NATIVE_SEAL precompile roots,
React/Solid backend overrides, clib import token regeneration,
runtime_module/jsx_factory_name lowering); duplicate pre-merge
backend impl monoliths (esast/jcir 10.8k lines) and the orphaned
accept-machinery impl files (dispatch/surface, 230 impls each)
removed so annex weaving terminates; jcir Complex literal lowering
migrated to the split impl layout (expr.impl.jac).

Local verification: layer10 140/140, layer9 203/203,
vm_conformance 199/199, flowgraph_verify 29/29 on isolated warm
caches; jac check over jac/jaclang clean.
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