Repository navigation
Freeze the language contracts for loops, calls and text templates - #13
Merged
Merged
Conversation
added 14 commits
October 7, 2026 21:48
…nd the Studio host
Say exactly how to apply INSTANCE_KEY_PATTERN: re.fullmatch in Python, the anchored form only for ECMAScript, JSON Schema and pydantic's Rust engine, and pin that InstanceKeyText rejects a trailing newline. Pin that the IR model does not accept weave/ir-v1alpha4 in this milestone, rename two stale test names, assert invalid callable specs against the exported definition schema too, and check the diagnostics cap test keeps only unsupported-feature findings plus one truncation marker. Docs: spell out the node ID grammar and @legacy, name every kind of generated inventory entry, list WeaveClient.language, and say Studio will read the language manifest.
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.
Summary
Language milestone M0 (contract freeze). Lanes E, A and O can now build on frozen names; the compiler still refuses every new construct.
forEach,callWorkflow,spec.callable,concatandjoininsideweave/v1alpha1;workflow.schema.jsonexportsForEachStep,CallWorkflowStepandCallableSpec. Existing documents and artifacts keep their canonical bytes and digests.WV-COMP-UNSUPPORTED_FEATUREat each use offorEach,callWorkflow,concatorjoin;callablecompiles because it only declares an interface.featuresfield; no IR version beyondweave/ir-v1alpha3is emitted or accepted.studio: ready | pendingmarks, served through the platform API, the CLI, the SDK, the Studio host andweave schema export.Capabilities.step_kindsnow lists all ten runnable kinds (it listed eight).schema-coverage.test.tsreads the manifest and compares onlyreadyentries.scope_atsignature and result models; the analysis lands with the loop compiler.examples/language/, and contract documentation.Frozen names other lanes import
firefly_weave.contracts.instance_keys:InstanceKey(node_id, indexes=(), segments=(), count=None),InvalidInstanceKey,node_of,split_instance,format_instance,InstanceView(node_id, instance_key, iteration),instance_view,INSTANCE_KEY_PATTERN(unanchored; Python usesre.fullmatch, ECMAScript and JSON Schema use^(?:...)$),InstanceKeyText,InstanceKeyTextOrEmptyfirefly_weave.contracts.language_features:LanguageFeature(text.concat,text.join,flow.forEach,flow.callWorkflow,ai.agent,ai.memory),LANGUAGE_FEATURES,ADVERTISED_FEATURES(empty in M0),KIND_FEATURES,OPERATOR_FEATURES,WORKFLOW_FIELD_FEATURES,DEFAULT_LOOP_MAX_ITEMS,MAX_LOOP_ITEMS,MAX_LOOP_DEPTH,MAX_RUN_ITERATIONS,MAX_CALL_DEPTHfirefly_weave.contracts.language:LanguageManifest,ManifestStepKind,ManifestOperator,ManifestWorkflowField,ManifestBlock,ManifestLimits,Arity,language_manifest(features=ADVERTISED_FEATURES),supported_step_kinds(features=ADVERTISED_FEATURES),IR_VERSIONS,MANIFEST_VERSION = "weave/language-manifest-v1"language.read=GET /api/v1/tenants/{tenant}/projects/{project}/language(catalog.read, bridged to Studio as familylanguage); Studio hostGET /studio/contracts/language;weave remote language;WeaveClient.language();weave schema exportwriteslanguage-manifest.schema.jsonfirefly_weave.compiler.ir:ExecutableBase.features: list[LanguageFeature];IR_VERSION_EXTENSIONS = "weave/ir-v1alpha4"(spec 3.1 name; defined, not accepted until M1)firefly_weave.compiler.language_support:COMPILED_FEATURES,UnsupportedUse,unsupported_uses(document); diagnosticWV-COMP-UNSUPPORTED_FEATUREfirefly_weave.compiler.scope:scope_at(document, path, *, catalog=None) -> ScopeResult,ScopeResult,ScopeEntry,ScopeSourceForEachStep,CallWorkflowStep,CallableSpec,CallerNames,WorkflowSpec.callable,OperatorNamewithconcatandjoinstudio/tests/fixtures/language/instance-keys.json,text-conversion.json,manifest.json, generated byscripts/language_fixtures.py(--checkfor freshness)Instance-key node IDs are the ASCII set
@?[A-Za-z0-9][A-Za-z0-9_.:@-]*(step IDs and the synthetic@IDs).Not in this pull request
agentmanifest entry (Lane A).scope_atcases (spec 14.3) with M3, when the code that produces them exists. Spec 14.5 lists them with M0, "extended by later milestones"; this pull request publishes the instance-key, text-conversion and manifest fixtures.Follow-ups for later milestones
language_manifest(features)andCapabilitiesmust addweave/ir-v1alpha4toir_versionsonce a feature is listed.featuresmust classify asir_unsupported, not a generic contract error (the field is typed with the six frozen values).OperatorNamenow admitsconcatandjoinin provider-source mappings too; until they are evaluated there, such a mapping fails with a generic "Invalid request value".compiler/ir.pymust descend intoforEachbodies and handlecallWorkflowreferences before those features compile.EXPECTEDintests/unit/compiler/test_language_examples.pyand re-checksnotify-overdueandorder-intake.Local verification (macOS, head
7005566)make check: all 17 stages,All requested checks passed.scripts/language_fixtures.py --checkandscripts/studio_schema_fixtures.py --check: exit 0.npm run check,npm run format:check,npm test(59 files, 657 tests passed),npm run build.npm run test:browser): 914 passed, 6 skipped. A first run under heavy machine load had two failures (connection.spec.ts:151,designer-forms.spec.ts:671) that passed in isolation and in the full rerun; this pull request changes no UI code.CI scope
The Python suites run on Linux CI only (
ci.ymlusesubuntu-latest; the macOS and Windows jobs indesktop.ymlbuild the desktop app, not the Python suites) until S6-M0 lands the cross-platform tier. The Windows line-ending case for fixture freshness is covered by a unit test.Test plan
make checknpm run check && npm run format:check && npm test && npm run build && npm run test:browserinstudio/