Repository navigation
test(shared): cover sandbox markers with an empty mode prefix - #404
Open
sahilkhedkar wants to merge 1 commit into
Open
sahilkhedkar wants to merge 1 commit into
sahilkhedkar wants to merge 1 commit into
Conversation
Signed-off-by: Sahil <sahilkhedkar11@gmail.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull Request Overview
✅ No blocking issues noticed
No blocking findings. The required sandbox-marker regression scenario is covered, with no reported implementation or quality issues.
Test suggestions
- A sandbox marker with an empty mode prefix returns an empty mode rather than the legacy run mode.
TIP Add review instructions in .codacy/instructions/review.md, or an AGENTS.md, so the reviewer knows your conventions.
TIP How was this review? Give us feedback
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.
SandboxMode()returns an empty string for a nonempty marker such asSOLONGATE_SANDBOX=:1.0.0, because the prefix before the first colon is empty. The existing table-driven test covered absent markers, recognized modes, and legacy values, but did not exercise this case.Add
{":1.0.0", ""}toTestSandboxModeReadsTheWeakerModeWhenItCannotTell, with a comment making the expected behavior explicit. This pins the existing empty-prefix behavior rather than changing it to the legacyrunfallback. The PR changes only the test file; runtime behavior is unchanged.Validation on this PR branch:
go vet ./...andgo test -count=1 -race ./...passed in all nine Go modules../scripts/sg-parity-check.sh: 10 passed, 0 failed../scripts/sg-layers-check.sh: 25 passed, 0 failed.git diff --checkpassed.i >= 0toi > 0; the new test failed withgot "run", want "", confirming it detects a regression in this branch. No runtime source was modified.Known repository/environment check failures:
./scripts/sg-unit-check.shstops at existing formatting issues in unchanged guard files; module checks were run directly as listed above../scripts/sg-box-check.sh: 21 passed, 1 failed. The failing assertion wasno other user's process(got NO,wanted YES). This remains unresolved and is outside this test-only change.No live agent-client session was used; verification used Go tests and the repository's Linux integration scripts.
Closes #356