Repository navigation
Optional fields in a flow piece's credential declaration - #484
Merged
Merged
Conversation
A secret declaration may list "optional" fields, each a value of its env map. Plan and submit no longer require them, the step fetch returns an optional field only when the stored secret has it, and the plan lists them so the UI can show them as optional. Declarations without it behave as before.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Why
A piece declares the runner's stored credentials it needs (
runtime_json.secrets). Every field inenvwas required, so Formulation (draft-lexicon) refused any run whosemodel_servercredential lacked an embedding address, even with keyword grounding, which never embeds.Change
"optional": ["<field>", ...]. Each item must be a value of that entry'senv(validated: list of strings, field-name pattern, subset ofenv, no duplicates; empty is dropped). Declarations without it behave exactly as before.SECRET_FIELDS_INCOMPLETEfor a missing required field. Every other fetch gate is unchanged: caller, rate limit, active run, HMAC, one use, trust re-check, version binding.optionalthrough, and the credential dialog shows it ("optional embedding_base_url").docs/api.mddocuments the schema.Security review
No high or medium findings. Checked:
optionalcan only make a step receive less, never another field or secret. A forged or changedoptionalfails the declaration check (STEP_SECRET_DECLARATION_CHANGED). Old plans and run rows stay all-required. Rolling back fails closed. An omitted field is not refilled from the container environment, because the piece reads only its inputs and the library refuses an OpenAI-compatible backend without an address. Low follow-ups, not in this PR:optionalwhen normalising;step_secret.issuedprovenance.Tests
test_demo_apifailures (git-ignored.env). New tests intest_step_secrets.py: validation, required vs optional, all-optional, submit, fetch present/absent, required field lost after submit.src/pages/modeling/thread: 336 passed; EMflowExecution.test.ts: 91 passed.After deploy
Register draft-lexicon r4 from the library (
wmobley/Semantic-Sensemakingfeat/setting-schemas,ce4dc5d), which declaresembedding_base_urloptional, and register Formulation again on it. An adapter without this change rejects the r4 declaration.🤖 Generated with Claude Code