Repository navigation
Analyze cross-package orchestration helpers with orchestratorvet - #197
Open
andystaples wants to merge 3 commits into
Open
andystaples wants to merge 3 commits into
andystaples wants to merge 3 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the changes extending replay-hazard detection across packages.
No open issues 🎉
What changed in this PR
Extends orchestratorvet to detect replay hazards in statically resolved orchestrators and helpers across packages within the same Go module, addressing #178 while keeping diagnostics rooted in orchestrator registrations.
Changes:
- Adds analysis facts that propagate hazard summaries and representative call paths across imports.
- Supports imported handlers and concrete methods while preserving conservative behavior for unresolved calls.
- Adds cross-package integration coverage, updates benchmarks, and documents the expanded scope and limitations.
| File | Description |
|---|---|
cmd/orchestratorvet/README.md |
Documents cross-package analysis and its limits. |
cmd/orchestratorvet/analysis/orchestratorgo/registration.go |
Records imported orchestrator registration roots. |
cmd/orchestratorvet/analysis/orchestratorgo/reach.go |
Enumerates local and imported call targets. |
cmd/orchestratorvet/analysis/orchestratorgo/index.go |
Resolves imported functions and handles ambiguous function values conservatively. |
cmd/orchestratorvet/analysis/orchestratorgo/facts.go |
Builds and propagates same-module hazard summaries. |
cmd/orchestratorvet/analysis/orchestratorgo/facts_test.go |
Tests cross-package diagnostics and excluded call paths. |
cmd/orchestratorvet/analysis/orchestratorgo/checks.go |
Adds hazard collection without local fixes or registry-dependent checks. |
cmd/orchestratorvet/analysis/orchestratorgo/bench_test.go |
Updates benchmarks to exercise summary construction. |
cmd/orchestratorvet/analysis/orchestratorgo/analyzer.go |
Integrates fact export and imported-hazard reporting. |
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Importer reassignment of exported package variables only matters for cross-package summaries. Restrict that exclusion to fact construction so same-package registrations and calls through exported variables are still analyzed as before. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
orchestratorvetnow follows statically resolved calls into other packages in the same Go module, including orchestrator handlers passed directly to a registry from an import. Go analysis facts carry replay-hazard summaries through imports. Diagnostics stay rooted in orchestrator registrations and show a representative call path at the local registration or call site; code used only by activities does not produce a diagnostic.The analyzer does not follow dynamic dispatch or cross-module calls, offer fixes for imported code, or expand its registry-name or loop-progress checks.
Closes #178.