Skip to content

interp: harden analysis observer events - #757

Merged
ewhauser merged 1 commit into
mainfrom
ewhauser/analysis-hook-followups
Mar 28, 2026
Merged

ewhauser merged 1 commit into
mainfrom
ewhauser/analysis-hook-followups

Conversation

@ewhauser

Copy link
Copy Markdown
Owner

Summary

  • deep-copy mutable expand.Variable payloads before emitting analysis events
  • preserve non-zero FileFinish status when chunk transformation fails before execution
  • add interpreter regressions covering both observer hardening cases

Why

PR #756 merged the public shell analysis hooks, and follow-up review found two gaps:

  • VariableWrite event payloads could still alias live shell slice/map storage
  • FileFinish could report success when chunk transformation failed before execution

Validation

  • go test ./internal/shell/interp -run 'TestAnalysisVariableWriteEventClonesVariableValues|TestRunReaderWithMetadataReportsTransformFailureStatusToAnalysis' -count=1
  • make test
  • make lint

@ewhauser
ewhauser marked this pull request as ready for review March 28, 2026 04:57
@ewhauser ewhauser changed the title [codex] interp: harden analysis observer events nterp: harden analysis observer events Mar 28, 2026
@ewhauser ewhauser changed the title nterp: harden analysis observer events interp: harden analysis observer events Mar 28, 2026
@ewhauser
ewhauser merged commit d8f22b6 into main Mar 28, 2026
15 checks passed
@ewhauser
ewhauser deleted the ewhauser/analysis-hook-followups branch March 28, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant