fix(#5722): inject FULLSEND_OUTPUT_SCHEMA into post-script env - #5729
Conversation
|
🤖 Finished Review · ✅ Success · Started 3:25 PM UTC · Completed 3:39 PM UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Looks good to me Previous runReviewFindingsLow
Labels: PR modifies runner lifecycle code (internal/cli/run.go) fixing a bug in post-script environment injection |
1a70eb1 to
def46ec
Compare
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 5:24 PM UTC · Completed 5:35 PM UTC |
Post-scripts run via childScriptEnv(h.RunnerEnv, traceparent) which merges os.Environ() with RunnerEnv but does not include FULLSEND_OUTPUT_SCHEMA from h.ValidationLoop.Schema. After PR #5688 introduced directory-level script caching, the schemas/ directory is no longer co-located with scripts/ in the cache, so process-fix-result.py's relative-path fallback broke. Extract the schema injection into a postScriptEnv helper (matching the existing validationEnv pattern) so the conditional is testable without duplicating production logic. exec.Cmd uses last-value-wins semantics, so the appended entry correctly overrides any stale process env value. Closes #5722 Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com>
42bc7ac to
08c551f
Compare
|
🤖 Finished Retro · ✅ Success · Started 9:08 PM UTC · Completed 9:17 PM UTC |
Retro: PR #5729 — inject FULLSEND_OUTPUT_SCHEMA into post-script envVerdict: Clean workflow. No new proposals — all improvement opportunities are covered by existing open issues. Timeline
What went well
Evidence for existing issues
Autonomy observations
|
Summary
Inject
FULLSEND_OUTPUT_SCHEMAfromh.ValidationLoop.Schemainto the post-script environment so that post-scripts (e.g.post-fix.shcallingprocess-fix-result.py) can locate the JSON schema without constructing a relative path. After PR #5688 introduced directory-level script caching, theschemas/directory is no longer co-located withscripts/in the cache tree, breaking the relative-path fallback. This adds the env var at the post-script callsite using the same pattern asvalidationEnv().Related Issue
Fixes #5722
Companion: fullsend-ai/agents#526 (updates
process-fix-result.pyto read the env var)Changes
internal/cli/run.go: AfterchildScriptEnv()returns, conditionally appendFULLSEND_OUTPUT_SCHEMAfromh.ValidationLoop.SchematopostCmd.Env(lines 992-997). Usesexec.Cmdlast-value-wins semantics to override any stale value from the process environment.internal/cli/run_test.go: Add three tests verifying the post-script schema injection: schema present whenValidationLoop.Schemais set, no append when schema is empty, no append whenValidationLoopis nil.Testing
TestPostScriptEnv_IncludesOutputSchema,TestPostScriptEnv_NoSchemaAppendedWhenEmpty,TestPostScriptEnv_NoSchemaAppendedWhenNoValidationLoop)TestValidationEnv_*,TestPostScriptRepoEnv,TestChildScriptEnv_*,TestBootstrapEnv_*)go vet ./internal/cli/...passesgo build ./internal/cli/...passesCloses #5722
Post-script verification
agent/5722-inject-schema-post-env)8ac8468aeabcc94dc3be41d911c7fa97508211db..HEAD)