This contract defines the boundary between Geno's target-agnostic language check and checks that name an execution target.
geno check --target TARGET,geno.api.check(..., target=TARGET), and manifest-targeted project checks first run the ordinary parser and typechecker, then validate the checked AST with the target's canonical compiler backend in memory.python-cliandpython-hosteduse Python backend validation;node-cliandbrowseruse JavaScript backend validation. Browser artifacts are still produced only bygeno buildbecause raw JavaScript compilation does not install the browser bootstrap or HTML wrapper.- A successful target-aware check guarantees that source-level lowering constraints are satisfied, including backend-safe identifiers, record fields, integer literals, and project namespaces. Validation does not write artifacts, execute generated code, or grant capabilities.
- A project with multiple manifest targets is checked against every declared target. An explicit check target selects one target, but the manifest is still parsed and target names are validated so typos fail closed.
- With no explicit or manifest target,
geno check,geno test, and editor diagnostics validate Python lowering when the selected entrypoint definesmain, matching defaultgeno run. Libraries without an entrypointmainremain permissive, even if an imported module defines one. Targetlessgeno.api.check()remains a language check with no compiler-lowering promise to preserve embedding and interpreter-oriented behavior. geno compile --target python|jskeeps its backend selector. If a manifest declares compatible execution targets, compilation checks those profiles; otherwise it uses the legacy defaults (python-cliornode-cli). An explicit--profilemay select a compatible execution profile after the manifest has been validated. Browser output continues to requiregeno build.- Expected target or backend validation failures are ordinary diagnostics: commands exit nonzero without a Python traceback and do not write the requested output artifact. Capability and sandbox policy remain unchanged.
Rendered from docs/design/target-aware-check.md in the Geno repository.