Skip to content

refactor(repl,metamodel): drop test-only forwarders witnessLine, sameName and containsSymbol - #1491

Merged
HuiJun merged 1 commit into
developfrom
refactor/drop-test-only-forwarders
Oct 25, 2026
Merged

HuiJun merged 1 commit into
developfrom
refactor/drop-test-only-forwarders

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

What and why

Three production helpers had no production callers and existed only so a test could call them under a local name:

  • witnessLine (internal/frontend/repl/checker.go) forwarded to analysis.WitnessLine; only checker_test.go called it.
  • sameName (internal/frontend/repl/compare.go) forwarded to simresults.SameName; only compare_test.go called it.
  • containsSymbol (internal/semantic/metamodel/evaluator.go) was a hand-rolled pointer-equality slices.Contains over []*symbols.Symbol; only evaluator_test.go called it.

All three are deleted. The tests are kept as they were and now call the real function (analysis.WitnessLine, simresults.SameName, slices.Contains), so the same assertions still run over the same inputs. No behaviour changes; the containsSymbol helpers in internal/exec/runtime and internal/semantic/semantics have production callers and are untouched.

How it was verified

  • go build ./... — clean
  • go vet ./... — clean
  • gofmt -l . — prints nothing
  • python3 scripts/changelog.py check — ok
  • go test ./... — every package ok except tests/codegen, which hit Go's default 10 min package timeout under full-suite load on the machine; rerun alone with go test -count=1 -timeout 60m ./tests/codegen it passes (ok … 462.395s). The suite does not exercise the changed packages beyond internal/frontend/repl and internal/semantic/metamodel, both ok.

Checklist

  • go build, go vet, gofmt -l, go test ./... pass locally (see above)
  • Tests kept; they now call the real functions directly
  • Documentation extended where it already covers the surface — none covers these unexported helpers
  • Changelog entry added as changes/unreleased/drop-test-only-forwarders.changed.md
  • No gate count moved
  • No internal work-item labels in the body, docs, or changelog

Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/239d2e7a8b954f0bb930a0c6b2b95286
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/239d2e7a8b954f0bb930a0c6b2b95286?variant=devin
Requested by: @HuiJun

…Name and containsSymbol

No production code called them; the tests now call analysis.WitnessLine, simresults.SameName and slices.Contains directly.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review October 25, 2026 04:43

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@HuiJun
HuiJun merged commit 9f62a52 into develop Oct 25, 2026
56 checks passed
@HuiJun
HuiJun deleted the refactor/drop-test-only-forwarders branch October 25, 2026 16:42
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