Closed
Conversation
Fix cost tracker, add to monthly-maintenance
Maintenance procedure documentation, scripts and email alerts
…g to mock storage
…ync-error Mitigate snakemake yaml sync error
…ad-experiment Fix MockStorageController.upload_experiment
Develop Environment
…t-when-server-get-down
- Adjusted tests.yaml (separate test units, improve efficiency) - Improved efficiency of Makefile/test_run_all
- Organize and optimize duplicate test runs
Fix pytest various errors
Add warning about changing db username
Increase active users before scale up
Explicit ENV_PREFIX to prevent cross-environment contamination
…ions Display platform information in Log viewer
…eanup Event-driven cleanup when an EC2 instance terminate
Add environment filtering to premium instance discovery
Inactive instances not terminated
ALB creation retry to fix race condition
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.
Content
Summary
has_intermediateswasfalsein the database.getExperimentUidFromFilePath()extracted the wrong path segment (segments[2], the function node ID) instead of the experiment UID (segments[1]). The selector always returnedtrue(default for unknown UID), so the degradation guard never triggered.getExperimentUidFromFilePath()covering all output path formats and edge cases.Design Decisions
segments[1]notsegments[2]-- Output paths from the backend are normalized to{workspaceId}/{experimentUid}/{functionNodeId}/filenamebynormalize_output_path(). The original comment incorrectly described the format as having a prepended nodeId. Verified by inspecting actual API responses across all algorithm types (Suite2P, CaImAn, LCCD, PCA, CCA, LDA) and tutorial experiments.getExperimentUidFromFilePathwas module-private. Exported it so the test file can import it directly without rendering the full React component.Evidence
The bug: The original code extracted
segments[2]from the file path, based on an incorrect comment:Actual path format from live API response (
GET /experiments/8):Because
segments[2]returned a function node ID (e.g.cca_e9mbfm8vck), the selectorselectExperimentHasIntermediates("cca_e9mbfm8vck")never found a matching experiment and defaulted totruevia?? true, bypassing the guard entirely.Live verification on development environment:
has_intermediates = 0on experimenta5feff3ein workspace 8DisplayDataItem.tsxwas ineffective)References
REPORT_2.md-- full test report documenting the bug discoveryFiles changed
frontend/src/components/Workspace/Visualize/DisplayDataItem.tsx-- Fix path segment index fromsegments[2]tosegments[1]; correct the path format comment; exportgetExperimentUidFromFilePathfor testabilityfrontend/src/components/Workspace/Visualize/__tests__/DisplayDataItem.test.ts-- New: 7 tests covering standard output paths, timeseries, tiff subdirectories, and null/empty/single-segment edge casesManual Testcases
has_intermediates = 0on an experiment record in the databasehas_intermediates = 1) and refresh -- plots should render normallyUnit, Integration, Contract Test Coverage
DisplayDataItem.test.ts-- 7 unit tests: standard output path, timeseries path, tiff subdirectory path, null input, undefined input, empty string, single-segment pathOthers
Difficulties
DisplayDataItemhad no test coverage and the function was not exported. The incorrect path comment made it appear intentional.Risk Assessment
has_intermediatesis false; no change to data serving or other UI statesnormalize_output_path()which guarantees{workspaceId}/{uid}/...format; verified across all algorithm typesgetExperimentUidFromFilePath