Skip to content

refactor(envd): make MultiplexedChannel.Fork return a receive-only channel - #3257

Merged
arkamar merged 1 commit into
mainfrom
refactor/receive-only-channel
Jul 10, 2026
Merged

arkamar merged 1 commit into
mainfrom
refactor/receive-only-channel

Conversation

@arkamar

@arkamar arkamar commented Jul 10, 2026

Copy link
Copy Markdown
Member

The bidirectional return type existed only so start.go could write a bootstrap event directly into its fork channel; that hack was removed in 04317f8 ("fix(envd): avoid Start deadlock after request cancellation (#3256)"), so let the compiler enforce that subscribers never send.

…annel

The bidirectional return type existed only so start.go could write a
bootstrap event directly into its fork channel; that hack was removed in
04317f8 ("fix(envd): avoid Start deadlock after request
cancellation (#3256)"), so let the compiler enforce that subscribers
never send.
@cursor

cursor Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Type-signature-only refactor with no runtime logic changes; existing callers already treat fork channels as receive-only.

Overview
MultiplexedChannel.Fork now returns a receive-only channel (<-chan T) instead of a bidirectional chan T, with the old comment about writing bootstrap events into fork channels removed. Fan-out behavior is unchanged; the type change lets the compiler block any future sends on subscriber channels, which is safe now that callers only read from forks.

Reviewed by Cursor Bugbot for commit 564c3f8. Bugbot is set up for automated code reviews on this repo. Configure here.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Fork method of MultiplexedChannel in multiplex.go to return a receive-only channel (<-chan T) instead of a bidirectional channel (chan T), removing outdated comments regarding backwards compatibility. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@codecov

codecov Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
3260 1 3259 9
View the top 3 failed test(s) by shortest run time
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildENV
Stack Traces | 0s run time
=== RUN   TestTemplateBuildENV
=== PAUSE TestTemplateBuildENV
=== CONT  TestTemplateBuildENV
--- FAIL: TestTemplateBuildENV (0.00s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildFromTemplate
Stack Traces | 0s run time
=== RUN   TestTemplateBuildFromTemplate
=== PAUSE TestTemplateBuildFromTemplate
=== CONT  TestTemplateBuildFromTemplate
--- FAIL: TestTemplateBuildFromTemplate (0.00s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildFromTemplateBaseCommandsInheritance
Stack Traces | 0s run time
=== RUN   TestTemplateBuildFromTemplateBaseCommandsInheritance
=== PAUSE TestTemplateBuildFromTemplateBaseCommandsInheritance
=== CONT  TestTemplateBuildFromTemplateBaseCommandsInheritance
--- FAIL: TestTemplateBuildFromTemplateBaseCommandsInheritance (0.00s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildFromTemplateCommandOverride
Stack Traces | 0s run time
=== RUN   TestTemplateBuildFromTemplateCommandOverride
=== PAUSE TestTemplateBuildFromTemplateCommandOverride
=== CONT  TestTemplateBuildFromTemplateCommandOverride
--- FAIL: TestTemplateBuildFromTemplateCommandOverride (0.00s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildFromTemplateLayered
Stack Traces | 0s run time
=== RUN   TestTemplateBuildFromTemplateLayered
=== PAUSE TestTemplateBuildFromTemplateLayered
=== CONT  TestTemplateBuildFromTemplateLayered
--- FAIL: TestTemplateBuildFromTemplateLayered (0.00s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildStartReadyCommandExecution
Stack Traces | 0s run time
=== RUN   TestTemplateBuildStartReadyCommandExecution
=== PAUSE TestTemplateBuildStartReadyCommandExecution
=== CONT  TestTemplateBuildStartReadyCommandExecution
--- FAIL: TestTemplateBuildStartReadyCommandExecution (0.00s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildWORKDIR
Stack Traces | 0s run time
=== RUN   TestTemplateBuildWORKDIR
=== PAUSE TestTemplateBuildWORKDIR
=== CONT  TestTemplateBuildWORKDIR
--- FAIL: TestTemplateBuildWORKDIR (0.00s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildWithDifferentSourceImages
Stack Traces | 0s run time
=== RUN   TestTemplateBuildWithDifferentSourceImages
=== PAUSE TestTemplateBuildWithDifferentSourceImages
=== CONT  TestTemplateBuildWithDifferentSourceImages
--- FAIL: TestTemplateBuildWithDifferentSourceImages (0.00s)
github.com/e2b-dev/infra/tests/integration/internal/tests/envd::TestListDir/depth_1_lists_root_directory
Stack Traces | 0.01s run time
=== RUN   TestListDir/depth_1_lists_root_directory
=== PAUSE TestListDir/depth_1_lists_root_directory
=== CONT  TestListDir/depth_1_lists_root_directory
    filesystem_test.go:96: 
        	Error Trace:	.../tests/envd/filesystem_test.go:96
        	Error:      	Received unexpected error:
        	            	unavailable: 502 Bad Gateway
        	Test:       	TestListDir/depth_1_lists_root_directory
--- FAIL: TestListDir/depth_1_lists_root_directory (0.01s)
github.com/e2b-dev/infra/tests/integration/internal/tests/envd::TestListDir/depth_2_lists_first_level_of_subdirectories_(in_this_case_the_root_directory)
Stack Traces | 0.01s run time
=== RUN   TestListDir/depth_2_lists_first_level_of_subdirectories_(in_this_case_the_root_directory)
=== PAUSE TestListDir/depth_2_lists_first_level_of_subdirectories_(in_this_case_the_root_directory)
=== CONT  TestListDir/depth_2_lists_first_level_of_subdirectories_(in_this_case_the_root_directory)
    filesystem_test.go:96: 
        	Error Trace:	.../tests/envd/filesystem_test.go:96
        	Error:      	Received unexpected error:
        	            	unavailable: 502 Bad Gateway
        	Test:       	TestListDir/depth_2_lists_first_level_of_subdirectories_(in_this_case_the_root_directory)
--- FAIL: TestListDir/depth_2_lists_first_level_of_subdirectories_(in_this_case_the_root_directory) (0.01s)
github.com/e2b-dev/infra/tests/integration/internal/tests/envd::TestListDir/depth_0_lists_only_root_directory
Stack Traces | 0.02s run time
=== RUN   TestListDir/depth_0_lists_only_root_directory
=== PAUSE TestListDir/depth_0_lists_only_root_directory
=== CONT  TestListDir/depth_0_lists_only_root_directory
    filesystem_test.go:96: 
        	Error Trace:	.../tests/envd/filesystem_test.go:96
        	Error:      	Received unexpected error:
        	            	unavailable: 502 Bad Gateway
        	Test:       	TestListDir/depth_0_lists_only_root_directory
--- FAIL: TestListDir/depth_0_lists_only_root_directory (0.02s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildENV/ENV_with_backslashes
Stack Traces | 0.03s run time
=== RUN   TestTemplateBuildENV/ENV_with_backslashes
=== PAUSE TestTemplateBuildENV/ENV_with_backslashes
=== CONT  TestTemplateBuildENV/ENV_with_backslashes
    build_template_test.go:373: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/build_template_test.go:373
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildENV/ENV_with_backslashes
--- FAIL: TestTemplateBuildENV/ENV_with_backslashes (0.03s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestMultipleTagsOnSameTemplate
Stack Traces | 0.04s run time
=== RUN   TestMultipleTagsOnSameTemplate
=== PAUSE TestMultipleTagsOnSameTemplate
=== CONT  TestMultipleTagsOnSameTemplate
    template_tags_test.go:285: 
        	Error Trace:	.../internal/utils/template.go:210
        	            				.../internal/utils/template.go:81
        	            				.../internal/utils/template.go:235
        	            				.../api/templates/template_tags_test.go:285
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestMultipleTagsOnSameTemplate
--- FAIL: TestMultipleTagsOnSameTemplate (0.04s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestSandboxCreateWithAliasAndTag
Stack Traces | 0.04s run time
=== RUN   TestSandboxCreateWithAliasAndTag
=== PAUSE TestSandboxCreateWithAliasAndTag
=== CONT  TestSandboxCreateWithAliasAndTag
    template_tags_test.go:207: 
        	Error Trace:	.../internal/utils/template.go:210
        	            				.../internal/utils/template.go:81
        	            				.../internal/utils/template.go:235
        	            				.../api/templates/template_tags_test.go:207
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestSandboxCreateWithAliasAndTag
--- FAIL: TestSandboxCreateWithAliasAndTag (0.04s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTagReassignment
Stack Traces | 0.04s run time
=== RUN   TestTagReassignment
=== PAUSE TestTagReassignment
=== CONT  TestTagReassignment
    template_tags_test.go:329: 
        	Error Trace:	.../internal/utils/template.go:210
        	            				.../internal/utils/template.go:81
        	            				.../api/templates/template_tags_test.go:329
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTagReassignment
--- FAIL: TestTagReassignment (0.04s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildENV/ENV_blocks_command_substitution_with_backticks
Stack Traces | 0.04s run time
=== RUN   TestTemplateBuildENV/ENV_blocks_command_substitution_with_backticks
=== PAUSE TestTemplateBuildENV/ENV_blocks_command_substitution_with_backticks
=== CONT  TestTemplateBuildENV/ENV_blocks_command_substitution_with_backticks
    build_template_test.go:373: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/build_template_test.go:373
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildENV/ENV_blocks_command_substitution_with_backticks
--- FAIL: TestTemplateBuildENV/ENV_blocks_command_substitution_with_backticks (0.04s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildENV/ENV_with_multiline_value
Stack Traces | 0.04s run time
=== RUN   TestTemplateBuildENV/ENV_with_multiline_value
=== PAUSE TestTemplateBuildENV/ENV_with_multiline_value
=== CONT  TestTemplateBuildENV/ENV_with_multiline_value
    build_template_test.go:373: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/build_template_test.go:373
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildENV/ENV_with_multiline_value
--- FAIL: TestTemplateBuildENV/ENV_with_multiline_value (0.04s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildFromTemplateLayered/Three-level_template_inheritance_with_ENV_accumulation
Stack Traces | 0.04s run time
=== RUN   TestTemplateBuildFromTemplateLayered/Three-level_template_inheritance_with_ENV_accumulation
=== PAUSE TestTemplateBuildFromTemplateLayered/Three-level_template_inheritance_with_ENV_accumulation
=== CONT  TestTemplateBuildFromTemplateLayered/Three-level_template_inheritance_with_ENV_accumulation
    build_template_test.go:844: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/build_template_test.go:844
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildFromTemplateLayered/Three-level_template_inheritance_with_ENV_accumulation
--- FAIL: TestTemplateBuildFromTemplateLayered/Three-level_template_inheritance_with_ENV_accumulation (0.04s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildWithTags
Stack Traces | 0.04s run time
=== RUN   TestTemplateBuildWithTags
=== PAUSE TestTemplateBuildWithTags
=== CONT  TestTemplateBuildWithTags
    template_tags_test.go:394: 
        	Error Trace:	.../internal/utils/template.go:210
        	            				.../internal/utils/template.go:81
        	            				.../api/templates/template_tags_test.go:394
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildWithTags
--- FAIL: TestTemplateBuildWithTags (0.04s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestDeleteTemplate
Stack Traces | 0.05s run time
=== RUN   TestDeleteTemplate
=== PAUSE TestDeleteTemplate
=== CONT  TestDeleteTemplate
    delete_template_test.go:18: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/delete_template_test.go:18
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestDeleteTemplate
--- FAIL: TestDeleteTemplate (0.05s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestSandboxCreateWithTag
Stack Traces | 0.05s run time
=== RUN   TestSandboxCreateWithTag
=== PAUSE TestSandboxCreateWithTag
=== CONT  TestSandboxCreateWithTag
    template_tags_test.go:115: 
        	Error Trace:	.../internal/utils/template.go:210
        	            				.../internal/utils/template.go:81
        	            				.../internal/utils/template.go:235
        	            				.../api/templates/template_tags_test.go:115
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestSandboxCreateWithTag
--- FAIL: TestSandboxCreateWithTag (0.05s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildENV/ENV_with_single_quotes
Stack Traces | 0.05s run time
=== RUN   TestTemplateBuildENV/ENV_with_single_quotes
=== PAUSE TestTemplateBuildENV/ENV_with_single_quotes
=== CONT  TestTemplateBuildENV/ENV_with_single_quotes
    build_template_test.go:373: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/build_template_test.go:373
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildENV/ENV_with_single_quotes
--- FAIL: TestTemplateBuildENV/ENV_with_single_quotes (0.05s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildFromTemplateInheritance
Stack Traces | 0.05s run time
=== RUN   TestTemplateBuildFromTemplateInheritance
=== PAUSE TestTemplateBuildFromTemplateInheritance
=== CONT  TestTemplateBuildFromTemplateInheritance
    build_template_test.go:654: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/build_template_test.go:654
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildFromTemplateInheritance
--- FAIL: TestTemplateBuildFromTemplateInheritance (0.05s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildFromTemplateStartCommand
Stack Traces | 0.05s run time
=== RUN   TestTemplateBuildFromTemplateStartCommand
=== PAUSE TestTemplateBuildFromTemplateStartCommand
=== CONT  TestTemplateBuildFromTemplateStartCommand
    build_template_test.go:700: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/build_template_test.go:700
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildFromTemplateStartCommand
--- FAIL: TestTemplateBuildFromTemplateStartCommand (0.05s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildInstalledPackagesAvailable
Stack Traces | 0.05s run time
=== RUN   TestTemplateBuildInstalledPackagesAvailable
=== PAUSE TestTemplateBuildInstalledPackagesAvailable
=== CONT  TestTemplateBuildInstalledPackagesAvailable
    build_template_test.go:1060: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/build_template_test.go:1060
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildInstalledPackagesAvailable
--- FAIL: TestTemplateBuildInstalledPackagesAvailable (0.05s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildWithDifferentSourceImages/Test_with_Ubuntu_24.04_base_image
Stack Traces | 0.05s run time
=== RUN   TestTemplateBuildWithDifferentSourceImages/Test_with_Ubuntu_24.04_base_image
=== PAUSE TestTemplateBuildWithDifferentSourceImages/Test_with_Ubuntu_24.04_base_image
=== CONT  TestTemplateBuildWithDifferentSourceImages/Test_with_Ubuntu_24.04_base_image
    build_template_test.go:1004: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/build_template_test.go:1004
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildWithDifferentSourceImages/Test_with_Ubuntu_24.04_base_image
--- FAIL: TestTemplateBuildWithDifferentSourceImages/Test_with_Ubuntu_24.04_base_image (0.05s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildWithTagsAndSandboxCreation
Stack Traces | 0.05s run time
=== RUN   TestTemplateBuildWithTagsAndSandboxCreation
=== PAUSE TestTemplateBuildWithTagsAndSandboxCreation
=== CONT  TestTemplateBuildWithTagsAndSandboxCreation
    template_tags_test.go:433: 
        	Error Trace:	.../internal/utils/template.go:210
        	            				.../internal/utils/template.go:81
        	            				.../api/templates/template_tags_test.go:433
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildWithTagsAndSandboxCreation
--- FAIL: TestTemplateBuildWithTagsAndSandboxCreation (0.05s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateTagAssign
Stack Traces | 0.05s run time
=== RUN   TestTemplateTagAssign
=== PAUSE TestTemplateTagAssign
=== CONT  TestTemplateTagAssign
    template_tags_test.go:28: 
        	Error Trace:	.../internal/utils/template.go:210
        	            				.../internal/utils/template.go:81
        	            				.../internal/utils/template.go:235
        	            				.../api/templates/template_tags_test.go:28
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateTagAssign
--- FAIL: TestTemplateTagAssign (0.05s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateTagAssignFromSourceTag
Stack Traces | 0.05s run time
=== RUN   TestTemplateTagAssignFromSourceTag
=== PAUSE TestTemplateTagAssignFromSourceTag
=== CONT  TestTemplateTagAssignFromSourceTag
    template_tags_test.go:59: 
        	Error Trace:	.../internal/utils/template.go:210
        	            				.../internal/utils/template.go:81
        	            				.../internal/utils/template.go:235
        	            				.../api/templates/template_tags_test.go:59
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateTagAssignFromSourceTag
--- FAIL: TestTemplateTagAssignFromSourceTag (0.05s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateTagDeleteLatestNotAllowed
Stack Traces | 0.05s run time
=== RUN   TestTemplateTagDeleteLatestNotAllowed
=== PAUSE TestTemplateTagDeleteLatestNotAllowed
=== CONT  TestTemplateTagDeleteLatestNotAllowed
    template_tags_test.go:94: 
        	Error Trace:	.../internal/utils/template.go:210
        	            				.../internal/utils/template.go:81
        	            				.../internal/utils/template.go:235
        	            				.../api/templates/template_tags_test.go:94
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateTagDeleteLatestNotAllowed
--- FAIL: TestTemplateTagDeleteLatestNotAllowed (0.05s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestUpdateTemplateVisibilityToPrivateWithAPIKey
Stack Traces | 0.05s run time
=== RUN   TestUpdateTemplateVisibilityToPrivateWithAPIKey
=== PAUSE TestUpdateTemplateVisibilityToPrivateWithAPIKey
=== CONT  TestUpdateTemplateVisibilityToPrivateWithAPIKey
    template_update_test.go:57: 
        	Error Trace:	.../internal/utils/template.go:210
        	            				.../internal/utils/template.go:81
        	            				.../internal/utils/template.go:235
        	            				.../api/templates/template_update_test.go:57
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestUpdateTemplateVisibilityToPrivateWithAPIKey
--- FAIL: TestUpdateTemplateVisibilityToPrivateWithAPIKey (0.05s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestUpdateTemplateWithInvalidAPIKey
Stack Traces | 0.05s run time
=== RUN   TestUpdateTemplateWithInvalidAPIKey
=== PAUSE TestUpdateTemplateWithInvalidAPIKey
=== CONT  TestUpdateTemplateWithInvalidAPIKey
    template_update_test.go:107: 
        	Error Trace:	.../internal/utils/template.go:210
        	            				.../internal/utils/template.go:81
        	            				.../internal/utils/template.go:235
        	            				.../api/templates/template_update_test.go:107
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestUpdateTemplateWithInvalidAPIKey
--- FAIL: TestUpdateTemplateWithInvalidAPIKey (0.05s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestAssignmentOrderingAfterTagReassignment
Stack Traces | 0.06s run time
=== RUN   TestAssignmentOrderingAfterTagReassignment
=== PAUSE TestAssignmentOrderingAfterTagReassignment
=== CONT  TestAssignmentOrderingAfterTagReassignment
    template_tags_test.go:589: 
        	Error Trace:	.../internal/utils/template.go:210
        	            				.../internal/utils/template.go:81
        	            				.../api/templates/template_tags_test.go:589
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestAssignmentOrderingAfterTagReassignment
--- FAIL: TestAssignmentOrderingAfterTagReassignment (0.06s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestAssignmentOrderingLatestWins
Stack Traces | 0.06s run time
=== RUN   TestAssignmentOrderingLatestWins
=== PAUSE TestAssignmentOrderingLatestWins
=== CONT  TestAssignmentOrderingLatestWins
    template_tags_test.go:522: 
        	Error Trace:	.../internal/utils/template.go:210
        	            				.../internal/utils/template.go:81
        	            				.../api/templates/template_tags_test.go:522
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestAssignmentOrderingLatestWins
--- FAIL: TestAssignmentOrderingLatestWins (0.06s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildCOPY
Stack Traces | 0.06s run time
=== RUN   TestTemplateBuildCOPY
=== PAUSE TestTemplateBuildCOPY
=== CONT  TestTemplateBuildCOPY
    build_template_test.go:1156: 
        	Error Trace:	.../api/templates/build_template_test.go:1113
        	            				.../api/templates/build_template_test.go:1159
        	            				.../api/templates/build_template_test.go:62
        	            				.../api/templates/build_template_test.go:1156
        	Error:      	Not equal: 
        	            	expected: 201
        	            	actual  : 503
        	Test:       	TestTemplateBuildCOPY
        	Messages:   	{"code":503,"message":"Error when getting available build client"}
--- FAIL: TestTemplateBuildCOPY (0.06s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildCache
Stack Traces | 0.06s run time
=== RUN   TestTemplateBuildCache
=== PAUSE TestTemplateBuildCache
=== CONT  TestTemplateBuildCache
    build_template_test.go:451: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/build_template_test.go:451
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildCache
--- FAIL: TestTemplateBuildCache (0.06s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildENV/ENV_blocks_command_substitution_with_dollar_paren
Stack Traces | 0.06s run time
=== RUN   TestTemplateBuildENV/ENV_blocks_command_substitution_with_dollar_paren
=== PAUSE TestTemplateBuildENV/ENV_blocks_command_substitution_with_dollar_paren
=== CONT  TestTemplateBuildENV/ENV_blocks_command_substitution_with_dollar_paren
    build_template_test.go:373: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/build_template_test.go:373
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildENV/ENV_blocks_command_substitution_with_dollar_paren
--- FAIL: TestTemplateBuildENV/ENV_blocks_command_substitution_with_dollar_paren (0.06s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildENV/ENV_variable_persistence
Stack Traces | 0.06s run time
=== RUN   TestTemplateBuildENV/ENV_variable_persistence
=== PAUSE TestTemplateBuildENV/ENV_variable_persistence
=== CONT  TestTemplateBuildENV/ENV_variable_persistence
    build_template_test.go:373: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/build_template_test.go:373
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildENV/ENV_variable_persistence
--- FAIL: TestTemplateBuildENV/ENV_variable_persistence (0.06s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildFromTemplateBaseCommandsInheritance/Start_command_inherited_from_base_template_uses_original_base_context
Stack Traces | 0.06s run time
=== RUN   TestTemplateBuildFromTemplateBaseCommandsInheritance/Start_command_inherited_from_base_template_uses_original_base_context
=== PAUSE TestTemplateBuildFromTemplateBaseCommandsInheritance/Start_command_inherited_from_base_template_uses_original_base_context
=== CONT  TestTemplateBuildFromTemplateBaseCommandsInheritance/Start_command_inherited_from_base_template_uses_original_base_context
    build_template_test.go:758: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/build_template_test.go:758
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildFromTemplateBaseCommandsInheritance/Start_command_inherited_from_base_template_uses_original_base_context
--- FAIL: TestTemplateBuildFromTemplateBaseCommandsInheritance/Start_command_inherited_from_base_template_uses_original_base_context (0.06s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildStartReadyCommandExecution/Complex_Start_and_Ready_commands_with_environment_variables
Stack Traces | 0.06s run time
=== RUN   TestTemplateBuildStartReadyCommandExecution/Complex_Start_and_Ready_commands_with_environment_variables
=== PAUSE TestTemplateBuildStartReadyCommandExecution/Complex_Start_and_Ready_commands_with_environment_variables
=== CONT  TestTemplateBuildStartReadyCommandExecution/Complex_Start_and_Ready_commands_with_environment_variables
    build_template_test.go:925: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/build_template_test.go:925
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildStartReadyCommandExecution/Complex_Start_and_Ready_commands_with_environment_variables
--- FAIL: TestTemplateBuildStartReadyCommandExecution/Complex_Start_and_Ready_commands_with_environment_variables (0.06s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildStartReadyCommandExecution/Start_and_Ready_commands_are_executed
Stack Traces | 0.06s run time
=== RUN   TestTemplateBuildStartReadyCommandExecution/Start_and_Ready_commands_are_executed
=== PAUSE TestTemplateBuildStartReadyCommandExecution/Start_and_Ready_commands_are_executed
=== CONT  TestTemplateBuildStartReadyCommandExecution/Start_and_Ready_commands_are_executed
    build_template_test.go:925: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/build_template_test.go:925
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildStartReadyCommandExecution/Start_and_Ready_commands_are_executed
--- FAIL: TestTemplateBuildStartReadyCommandExecution/Start_and_Ready_commands_are_executed (0.06s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildWORKDIR/WORKDIR_persistence
Stack Traces | 0.06s run time
=== RUN   TestTemplateBuildWORKDIR/WORKDIR_persistence
=== PAUSE TestTemplateBuildWORKDIR/WORKDIR_persistence
=== CONT  TestTemplateBuildWORKDIR/WORKDIR_persistence
    build_template_test.go:428: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/build_template_test.go:428
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildWORKDIR/WORKDIR_persistence
--- FAIL: TestTemplateBuildWORKDIR/WORKDIR_persistence (0.06s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildWORKDIR/WORKDIR_persistence_in_start_command
Stack Traces | 0.06s run time
=== RUN   TestTemplateBuildWORKDIR/WORKDIR_persistence_in_start_command
=== PAUSE TestTemplateBuildWORKDIR/WORKDIR_persistence_in_start_command
=== CONT  TestTemplateBuildWORKDIR/WORKDIR_persistence_in_start_command
    build_template_test.go:428: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/build_template_test.go:428
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildWORKDIR/WORKDIR_persistence_in_start_command
--- FAIL: TestTemplateBuildWORKDIR/WORKDIR_persistence_in_start_command (0.06s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildWithTagInAlias
Stack Traces | 0.06s run time
=== RUN   TestTemplateBuildWithTagInAlias
=== PAUSE TestTemplateBuildWithTagInAlias
=== CONT  TestTemplateBuildWithTagInAlias
    template_tags_test.go:475: 
        	Error Trace:	.../internal/utils/template.go:210
        	            				.../internal/utils/template.go:81
        	            				.../api/templates/template_tags_test.go:475
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildWithTagInAlias
--- FAIL: TestTemplateBuildWithTagInAlias (0.06s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestUpdateTemplateVisibilityToPublicWithAPIKey
Stack Traces | 0.06s run time
=== RUN   TestUpdateTemplateVisibilityToPublicWithAPIKey
=== PAUSE TestUpdateTemplateVisibilityToPublicWithAPIKey
=== CONT  TestUpdateTemplateVisibilityToPublicWithAPIKey
    template_update_test.go:18: 
        	Error Trace:	.../internal/utils/template.go:210
        	            				.../internal/utils/template.go:81
        	            				.../internal/utils/template.go:235
        	            				.../api/templates/template_update_test.go:18
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestUpdateTemplateVisibilityToPublicWithAPIKey
--- FAIL: TestUpdateTemplateVisibilityToPublicWithAPIKey (0.06s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildFromTemplate/Basic_fromTemplate_functionality
Stack Traces | 0.07s run time
=== RUN   TestTemplateBuildFromTemplate/Basic_fromTemplate_functionality
=== PAUSE TestTemplateBuildFromTemplate/Basic_fromTemplate_functionality
=== CONT  TestTemplateBuildFromTemplate/Basic_fromTemplate_functionality
    build_template_test.go:521: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/build_template_test.go:521
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildFromTemplate/Basic_fromTemplate_functionality
--- FAIL: TestTemplateBuildFromTemplate/Basic_fromTemplate_functionality (0.07s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestDeleteTemplateFromAnotherTeamAPIKey
Stack Traces | 0.08s run time
=== RUN   TestDeleteTemplateFromAnotherTeamAPIKey
=== PAUSE TestDeleteTemplateFromAnotherTeamAPIKey
=== CONT  TestDeleteTemplateFromAnotherTeamAPIKey
    delete_template_test.go:51: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/delete_template_test.go:51
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestDeleteTemplateFromAnotherTeamAPIKey
--- FAIL: TestDeleteTemplateFromAnotherTeamAPIKey (0.08s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildFromTemplateCommandOverride/Start_command_override_in_derived_template
Stack Traces | 0.08s run time
=== RUN   TestTemplateBuildFromTemplateCommandOverride/Start_command_override_in_derived_template
=== PAUSE TestTemplateBuildFromTemplateCommandOverride/Start_command_override_in_derived_template
=== CONT  TestTemplateBuildFromTemplateCommandOverride/Start_command_override_in_derived_template
    build_template_test.go:591: 
        	Error Trace:	.../api/templates/build_template_test.go:75
        	            				.../api/templates/build_template_test.go:591
        	Error:      	Not equal: 
        	            	expected: 202
        	            	actual  : 503
        	Test:       	TestTemplateBuildFromTemplateCommandOverride/Start_command_override_in_derived_template
--- FAIL: TestTemplateBuildFromTemplateCommandOverride/Start_command_override_in_derived_template (0.08s)
github.com/e2b-dev/infra/tests/integration/internal/tests/envd::TestListDir
Stack Traces | 0.92s run time
=== RUN   TestListDir
=== PAUSE TestListDir
=== CONT  TestListDir
--- FAIL: TestListDir (0.92s)
github.com/e2b-dev/infra/tests/integration/internal/tests/proxies::TestMaskRequestHostAPIParameter
Stack Traces | 4.83s run time
=== RUN   TestMaskRequestHostAPIParameter
=== PAUSE TestMaskRequestHostAPIParameter
=== CONT  TestMaskRequestHostAPIParameter
Executing command python3 in sandbox im5rdpikb098t2snvzb4q (user: root)
    mask_request_host_test.go:44: Command [python3] output: event:{start:{pid:1134}}
    mask_request_host_test.go:68: Command [cat] output: event:{start:{pid:1135}}
    mask_request_host_test.go:68: Command [cat] output: event:{end:{exited:true status:"exit status 0"}}
    mask_request_host_test.go:68: Command [cat] completed successfully in sandbox im5rdpikb098t2snvzb4q
    mask_request_host_test.go:72: Data: 
    mask_request_host_test.go:73: 
        	Error Trace:	.../tests/proxies/mask_request_host_test.go:73
        	Error:      	"" does not contain "Host: localhost:8080"
        	Test:       	TestMaskRequestHostAPIParameter
--- FAIL: TestMaskRequestHostAPIParameter (4.83s)
View the full list of 1 ❄️ flaky test(s)
github.com/e2b-dev/infra/tests/integration/internal/tests/envd::TestListDir/depth_3_lists_all_directories_and_files

Flake rate in main: 30.77% (Passed 9 times, Failed 4 times)

Stack Traces | 0.01s run time
=== RUN   TestListDir/depth_3_lists_all_directories_and_files
=== PAUSE TestListDir/depth_3_lists_all_directories_and_files
=== CONT  TestListDir/depth_3_lists_all_directories_and_files
    filesystem_test.go:96: 
        	Error Trace:	.../tests/envd/filesystem_test.go:96
        	Error:      	Received unexpected error:
        	            	unavailable: 502 Bad Gateway
        	Test:       	TestListDir/depth_3_lists_all_directories_and_files
--- FAIL: TestListDir/depth_3_lists_all_directories_and_files (0.01s)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Type signature tightening — trivially safe refactor.

Extended reasoning...

Overview

Single-file refactor to packages/envd/internal/services/process/handler/multiplex.go changing Fork()'s return type from chan T to <-chan T. The PR description explains the bidirectional return was a legacy accommodation for start.go writing a bootstrap event into the fork channel, which was removed in the prior commit (04317f8, PR #3256).

Security risks

None. This is a compile-time type refinement; no runtime behavior changes.

Level of scrutiny

Very low. I verified all call sites (connect.go, start.go, and the test file) only read from the returned channel — none send into it — so the tighter type will compile cleanly. The stale doc comment about backwards compat is also correctly removed.

Other factors

No outstanding reviewer comments, no bugs surfaced by the hunter, mechanical change with obvious intent.

@arkamar
arkamar merged commit 1645e7c into main Jul 10, 2026
74 of 76 checks passed
@arkamar
arkamar deleted the refactor/receive-only-channel branch July 10, 2026 17:33
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.

2 participants