feat(jobs): restore typed inputs end-to-end #140
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_proc!140
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_restore_typed_inputs"
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?
Restore typed inputs end-to-end (#137)
Root cause
Typed inputs were half-removed in the multi-domain migration. The templating engine (
actions/template.rs),HERO_INPUT_*injection, andapply_inputsstill lived in the server, andAction.input_schemastill persisted — but the multi-domain SDK creates jobs only throughrun_quick_submit, which never threaded inputs intoapply_inputs, andRunSpechad noinputsfield.JobCreateInput/inputsexisted only in the docs.Change (oschema-first; all types regenerated, none hand-written)
inputsmap toRunSpec; add aJobCreate { spec, context, inputs }struct and ajob_create(req: JobCreate) -> strmethod on the Jobs service (the macro generatesJobCreateInput/JobCreateOutput).openrpc_jobs.jsonregenerated.run_quick_submitnow rendersRunSpec.inputsinto every action via the existingapply_inputs;job_createcreates and submits a one-shot job, applying inputs the same way. Empty inputs short-circuit, so the no-inputs path is byte-for-byte unchanged.JobCreate/JobCreateInputare surfaced;.input()/.inputs()setters added to the job and run builders, plus an.input_schema()setter onActionBuilder; the fluent job builder now creates viajob_createand returns the job sid.api.mdtyped-inputs section and the header banner reconciled with the restored surface; stale template-engine path fixed.Behavior (matches §1.5)
{{var}}/{{nested.path}}render inspec.script, everyspec.envvalue, and (forai)ai_config.{system_prompt,model}; unresolved placeholders stay literal. Non-aiinterpreters also getHERO_INPUT_<UPPERCASE_KEY>(strings verbatim, non-strings JSON-serialized).input_schemastays declarative (persisted + exposed, not enforced).Verification
cargo build --workspaceclean;cargo clippy --workspacereports zero errors; the feature crates are clean under-D warnings.basic::jobs_quick::typed_inputs_render_and_envpasses against a private isolated daemon: registers agreetaction with aninput_schema, runs two invocations (alice/3, bob/7), and asserts the rendered script output,HERO_INPUT_NAMEin the job env, andinput_schemaround-trip.developmentwithout theStateOutput.valuefix included here) and are unrelated to typed inputs; the inputs-adjacentuc40_job_inputs_mappasses when run alone.Closes #137
Update — merged
development(#139)#139landed ondevelopmentand overlapped this branch inrun_quick_submit.Merged
developmentin (dbe6356) and resolved:run_quick_submit: kept both behaviours — persist the inline actiontemplate (
__inline:run=<id>tag) before rendering, thenapply_inputsinto the job's spec copy only. So the stored action keeps its
{{placeholders}}(#139 discovery + cascade-delete) and the job gets therendered values (#140 typed inputs).
parallel_jobs_logging.rs: took development's de-noised log loop.jobs_quick.rs: dropped a deadlastinitializer (unused_assignments,keeps
clippy -D warningsclean).Re-verified post-merge against an isolated daemon — all pass:
typed_inputs_render_and_env,run_submit_trivial_inline,submit_inline_orders_job_sequence, andcleanup_on_success_deletes_inline(the last confirms #139's inline persist + cascade survived).
cargo buildclean.mahmoud referenced this pull request2026-06-08 16:18:22 +00:00