refactor(core): move session test to nodes by jlongster · Pull Request #34245 · anomalyco/opencode · GitHub
Skip to content

refactor(core): move session test to nodes#34245

Merged
jlongster merged 1 commit into
devfrom
jlongster/even-more-tests
Jun 27, 2026
Merged

refactor(core): move session test to nodes#34245
jlongster merged 1 commit into
devfrom
jlongster/even-more-tests

Conversation

@jlongster

@jlongster jlongster commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

N/A

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Moves several core tests from hand-written defaultLayer composition to the new app node graph builder.

  • Converts project, project directory, question, session projector, and session todo tests to use AppNodeBuilder.build(...) where appropriate.
  • Keeps direct test dependencies explicit by adding dependency nodes as graph roots when tests yield those services directly.
  • Replaces the manual SessionV2.layer setup in the session projector test with a node graph that binds SessionExecution.node to a noop execution node.
  • Renames app node builder usage to AppNodeBuilder.build(...) for clarity.
  • Leaves specialized local layer overrides in place where tests intentionally exercise a narrow layer boundary.

How did you verify your code works?

  • bun typecheck in packages/core
  • bun test test/project.test.ts test/project-directories.test.ts test/question.test.ts test/session-projector.test.ts test/session-todo.test.ts in packages/core

Screenshots / recordings

N/A - no UI changes.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

@jlongster jlongster merged commit d25c91e into dev Jun 27, 2026
12 checks passed
@jlongster jlongster deleted the jlongster/even-more-tests branch June 27, 2026 17:19
github-actions Bot pushed a commit to iwwadigital/opencode that referenced this pull request Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant