Skip to content

Curious#3

Merged
TheApeMachine merged 64 commits into
masterfrom
curious
Jul 6, 2026
Merged

Curious#3
TheApeMachine merged 64 commits into
masterfrom
curious

Conversation

@TheApeMachine

Copy link
Copy Markdown
Owner

No description provided.

- Added `github.com/cinar/indicator/v2` as a new indirect dependency in `go.mod`.
- Updated `Makefile` to include new debug targets for improved debugging workflows.
- Refactored WebSocket handling in `cmd/root.go` to ensure proper execution of concurrent tasks.
- Enhanced signal gauge drawing logic in `frontend/src/components/charts/confidence/draw-signal-gauge.ts` to account for calibration state.
- Expanded test coverage for websocket handlers in `frontend/src/providers/websocket-handlers.test.ts` to validate new functionality.
- Improved websocket handling in `frontend/src/providers/websocket.ts` for better error management and message processing.
- Refactored various components to streamline code and enhance maintainability.
- Updated the Makefile to enable debugging with the `DATURA_INSPECT` environment variable during the run command.
- Improved the signal gauge drawing logic to account for calibration state in `frontend/src/components/charts/confidence/draw-signal-gauge.ts`.
- Added a new test case in `frontend/src/providers/websocket-handlers.test.ts` to validate gauge hydration from state readings.
- Enhanced WebSocket handling in `frontend/src/providers/websocket.ts` for better error management.
- Refactored the `Crypto` struct in `trader/crypto.go` to streamline broadcast management and improve subscription handling.
- Removed obsolete test files to clean up the codebase and improve maintainability.
…handling

- Deleted the `websocket_test.go` file to clean up the codebase and remove unused tests.
- Improved the `onMessage` method in `websocket.go` to ensure the WebSocket connection is established before processing messages, enhancing error handling and reliability.
- Refactored the `onMessage` method in `websocket.go` to utilize a context-aware approach for connection checks, improving error handling.
- Introduced new functions in `signal_test.go` to insert trader tickers with timestamps and validate the order of measurements.
- Enhanced the `Measure` method in `signal.go` to sort artifacts by timestamp and update cursors accordingly, ensuring accurate signal processing.
- Added tests in `hub_test.go` to verify WebSocket message writing and artifact handling, improving overall test coverage and reliability.
- Replaced the `DashboardLayout` component with `SymmTerminal` in the main routing file, streamlining the application structure.
- Improved the `Measure` method across various signal implementations to enhance artifact handling and ensure robust processing of measurement data.
- Updated signal measurement tests to validate the new logic and ensure comprehensive coverage of signal processing scenarios.
- Added multiple images of the S.Y.M.M. Terminal to the README for better visualization.
- Updated CSS styles to improve the overall appearance, including scrollbar customization and selection colors.
- Refactored terminal component styles for consistency and improved layout structure.
- Enhanced signal processing tests to validate new health status logic and ensure comprehensive coverage.
- Added a new test case for rendering the decision tree candidate surface in the dashboard, ensuring proper display of backend data.
- Refactored dashboard styles for consistency, including updates to color variables and layout adjustments.
- Improved health panel metrics display and updated kernel list styling for better user experience.
- Enhanced WebSocket handling to support new decision trace events, improving real-time data processing capabilities.
- Introduced a new trading model check to differentiate between live trading and paper trading, enhancing WebSocket connection handling for private and public data streams.
- Refactored cognitive frame parsing to support nested cognition attributes, improving data normalization and retrieval for cognitive readings.
- Added new test cases to validate the parsing of nested cognition attributes and ensure comprehensive coverage of cognitive frame scenarios.
- Updated frontend components to reflect changes in cognitive data handling and improve overall user experience.
- Added a new guideline for error handling, specifying that instance variables for errors should always be named `err` and logged using `errnie`.
- Revised the review guidelines to emphasize correctness, performance, and complexity, providing clearer instructions for code reviews.
- Removed outdated sections to streamline the review process and enhance clarity in expectations for contributors.
- Added `github.com/cloudwego/base64x v0.1.7` as a new indirect dependency in `go.mod`.
- Refactored error handling in `confidenceBaseline`, `ringCapacity`, and `spreadWideRatio` functions to include error checks and logging using `errnie`.
- Updated test cases in `operand_test.go` to utilize the shorthand for convey assertions, enhancing readability and consistency.
- Updated the review guidelines in `review.md` to clarify correctness checks and performance considerations, including new rules for dynamic processing and artifact handling.
- Added a new `Logo` component to standardize branding across the application.
- Refactored CSS styles in `styles.css` and `layout.css` to improve layout consistency and responsiveness.
- Introduced a new `Flex` component for better layout management in the UI.
- Added new tab components to enhance user navigation and organization within the application.
- Improved overall styling and structure of the frontend components for a more cohesive user experience.
- Updated the `Desk` struct to handle trader actions more effectively, including the introduction of a new `execute` method for processing buy and sell orders.
- Enhanced stoploss management by implementing `armStop`, `retireStop`, and `ratchet` methods to ensure proper trailing stop functionality.
- Improved error handling in the `execute` method to validate actions and ensure robust order processing.
- Refactored the `Stoploss` struct to encapsulate stop management logic and facilitate artifact serialization for shared tree storage.
- Updated the `Update` method in `Desk` to process multiple actions in a single call, enhancing performance and usability.
- Removed obsolete code and improved overall structure for better maintainability and clarity.
- Added a new section in `AGENTS.md` outlining the project objective and emphasizing the importance of principled decision-making in trading.
- Updated the `Measure` method in various signal implementations to return an iterable sequence of artifacts, improving flexibility in handling measurements.
- Introduced a `Held` method in the `Balances` struct to check for positive balances, enhancing ledger management.
- Refactored the `Update` method in `Story` to incorporate live holdings, ensuring accurate evaluation of playbook conditions.
- Improved the `SymbolFromTicker` function to accept a row index, allowing for better handling of multiple ticker updates.
- Enhanced test cases across signal implementations to validate the new measurement logic and ensure comprehensive coverage.
…ions

- Updated `AGENTS.md` to improve formatting and clarity in the decision-making process for trading stages.
- Enhanced the `Desk` struct to include a new `quote` field for better handling of market quotes.
- Refactored the `execute` method to incorporate risk-based sizing for buy orders, improving order management.
- Improved error handling in the `send` method to ensure robust communication with the broker.
- Updated the `markFor` method to utilize a timestamp-based prefix for ticker retrieval, enhancing data accuracy.
- Enhanced test coverage for the `Desk` struct to validate new functionalities and ensure reliability.
- Updated the `Desk` struct to include new methods for aligning entry quantities and rounding to exchange increments, ensuring compliance with trading constraints.
- Introduced an `instrument` struct to encapsulate exchange constraints for trading pairs, improving order management.
- Enhanced the `sizeBuy` method to align order sizes with instrument constraints, preventing sub-minimum entries.
- Added tests to validate the new alignment logic and ensure robust handling of trading operations.
- Updated the configuration for UI address to improve application connectivity.
…cessing

- Updated the `AllocationSidePanel` to enhance allocation logic, integrating real-time data handling and improved UI rendering.
- Refactored the `DecisionTreeView` to streamline decision evaluation, incorporating causal ladder visualization and better state management.
- Enhanced the `CausalLadder` component to display causal measurement insights effectively.
- Updated the `Makefile` to streamline frontend testing commands.
- Added configuration options in `config.yml` to cap subscribed symbols for websocket connections, improving performance and reliability.
… and cognitive visualization

- Updated the `markFor` method in the `Desk` struct to enhance ticker retrieval logic, improving data accuracy.
- Refactored the `allocationRows` function to streamline allocation logic, integrating new metrics for candidate evaluation.
- Enhanced cognitive visualization components to utilize backend DMT branches, improving the representation of cognitive readings.
- Added new properties to `CognitiveReading` and related types to support expanded functionality in cognitive processing.
- Improved error handling and state management in various frontend components for better user experience and reliability.
…proved data processing

- Updated the measurements store to support batching of readings and maintain history for each measurement, improving data accuracy and performance.
- Refactored tests for the measurements store to validate new functionality and ensure robust handling of updates.
- Enhanced terminal components to utilize the new measurement history features, improving visualization of confidence metrics.
- Introduced new utility functions for managing measurement history in terminal components, streamlining data access and rendering.
- Improved websocket handling for measurement updates, ensuring efficient data processing and reduced latency.
…omponents

- Added a pprof server to the application for performance profiling, configurable via environment variables and application settings.
- Refactored decision handling in the frontend to improve state management and ensure accurate updates based on incoming frames.
- Enhanced the decision store to aggregate decisions based on their sequence, improving the handling of decision frames.
- Updated tests to validate the new decision processing logic and ensure robust functionality across components.
- Removed deprecated configuration options related to symbol capping, streamlining the configuration file.
- Added .codebase-memory/graph.db.zst to .gitignore to prevent unnecessary file tracking.
- Introduced a new test case in cognitive-viz.test.ts to verify that the current sensory sequence is highlighted correctly, ensuring accurate representation of cognitive beams.
- Refactored cortex-tree.ts to improve the handling of beam prefixes, enhancing the logic for active prefixes based on reading and beam data.
- Updated decisions-from-walk.ts to allow for dynamic kernel scoring based on symbol-specific conditions, improving decision accuracy.
- Enhanced terminal dashboard rows to include edgePositive state in tests, ensuring comprehensive coverage of decision metrics.
…omponents

- Updated the artifact.json to reflect new commit and indexing details.
- Enhanced the allocation model to utilize backend decision frames, improving decision accuracy.
- Added tests to validate the integration of backend decision batches in allocation logic.
- Refactored decision handling in the frontend to ensure accurate updates based on incoming frames.
- Improved snapshot handling in trader components to maintain the latest measurements per origin/symbol.
- Added .codebase-memory/artifact.json to .gitignore to prevent unnecessary file tracking.
- Updated the Desk's sizing logic to account for configured adverse slippage, improving order quantity calculations.
- Introduced a new test for Desk sizing against configured slippage, ensuring accurate handling of market entries.
- Refactored decision processing in frontend components to maintain accurate updates based on incoming frames.
- Updated the Desk's `Update`, `sizeBuy`, and `roundQuantity` methods to return errors for invalid inputs, improving robustness.
- Enhanced the `markFor` method to return errors when no valid mark is found, ensuring better error reporting.
- Refactored the `alignEntry` method to return errors for entries below minimum requirements, preventing invalid trades.
- Improved error handling in WebSocket connections and message processing across various components, enhancing reliability.
- Updated tests to validate new error handling logic and ensure accurate behavior in trading scenarios.
- Removed the `components.json` file to streamline the configuration.
- Updated `package.json` to simplify build and development scripts, removing unnecessary commands.
- Cleaned up `pnpm-lock.yaml` by removing unused dependencies and updating existing ones.
- Deleted unused styles in `styles.css` to reduce bundle size and improve performance.
- Refactored tests in `measurements.test.ts` for clarity and accuracy in reading updates.
- Removed several unused components, including `audit.tsx`, `header.tsx`, and others, to enhance code maintainability.
- Updated Desk's state management to utilize atomic pointers for better concurrency handling.
- Refactored stoploss logic to improve state updates and ensure accurate trailing stop behavior.
- Enhanced error handling in Desk's message processing, ensuring robust responses to invalid inputs.
- Introduced new tests to validate the updated Desk functionality and ensure accurate trading operations.
- Improved configuration settings in `config.yml` for optimized market depth and subscription pacing.
- Updated the Desk's state structure to include orders and positions, improving trading logic and state management.
- Enhanced error handling in Desk's message processing to prevent panics on invalid artifacts.
- Introduced new tests for Desk functionality, including handling of invalid artifacts and ensuring accurate state restoration on startup.
- Updated artifact serialization methods to handle nil cases gracefully, improving robustness.
- Enhanced configuration settings in `config.yml` for optimized stop management and trading parameters.
- Added new dependencies for the Kraken futures WebSocket client.
- Removed outdated and unused code related to paper trading and execution handling.
- Refactored WebSocket connection logic to improve error handling and connection stability.
- Updated artifact handling in the WebSocket to ensure accurate message routing and processing.
- Cleaned up test cases related to paper trading, ensuring they align with the current architecture.
- Enhanced configuration settings for better management of WebSocket connections and message processing.
…nsity

- Introduced the `HawkesIntensityPanel` component to visualize Hawkes self-exciting intensity with a canvas drawing.
- Implemented logic to handle sample data and display intensity metrics dynamically.
- Enhanced the layout of the route component to integrate the new panel, improving user interface for metrics visualization.
- Introduced setup key handling in Desk's order processing to improve decision tracking and risk management.
- Updated Desk's state management to include new maps for pending orders and acknowledgments, enhancing order lifecycle management.
- Added tests to validate setup key integration in order payloads and ensure accurate processing of market and limit orders.
- Refactored order handling logic to incorporate setup key checks, improving the robustness of order execution and risk assessment.
- Enhanced stoploss and edge estimation logic to utilize setup keys for better decision-making in trading scenarios.
…ality

- Updated Makefile to introduce new optimization parameters for audit and replay files, improving the optimization process.
- Refactored the optimize-playbook command to support additional flags for replay, symbols, and iterations, enhancing flexibility in optimization.
- Modified desk component to streamline order processing by removing unnecessary order roles, improving clarity in execution handling.
- Enhanced test cases to validate changes in decision processing and ensure accurate symbol handling in terminal components.
- Removed the OPTIMIZE_ITERATIONS variable from the Makefile to streamline the optimization command.
- Updated the optimize command to simplify its parameters, enhancing usability and flexibility.
- Added validation checks in the Desk component to handle nil artifacts and improve error handling.
- Updated artifact.json to reflect new commit details and metrics, ensuring accurate tracking of changes.
- Enhanced various components to ensure robust handling of invalid artifacts and improve overall system stability.
…ocessing

- Updated artifact.json to reflect new commit details and revised metrics for nodes, edges, original size, and compressed size.
- Introduced new tests in the Desk component to validate unfilled limit order cancellation after transit TTL, ensuring accurate order lifecycle management.
- Enhanced Desk's order processing logic to include decision and action IDs, improving tracking and management of orders.
- Refactored various components to streamline error handling and improve overall system stability.
…tionality

- Updated artifact.json to reflect new commit details and revised metrics for nodes, edges, original size, and compressed size.
- Removed the deprecated DispatchWebSocketFrame function and refactored WebSocket handling for clearer message processing.
- Standardized channel naming from "TradesChannel" to "TradeChannel" across multiple files for consistency.
- Enhanced the CrossSection and Signal components to improve handling of ticker artifacts and measurement logic.
- Removed unused Symbol struct and related functions to streamline the codebase.
- Updated tests to validate changes in artifact handling and ensure robust measurement across signals.
- Updated AGENTS.md to clarify implementation principles for signal processing, emphasizing rigorous adherence to specifications and avoidance of shortcuts.
- Removed deprecated causal history and node management files to streamline the codebase.
- Enhanced the Signal struct to incorporate new components for ticker, book, and trade, improving measurement capabilities.
- Updated artifact.json to reflect new commit details and revised metrics for nodes and edges.
- Improved test coverage for signal measurement and artifact handling, ensuring robust validation of changes.
- Updated artifact.json to reflect new commit details and revised metrics for nodes, edges, original size, and compressed size.
- Enhanced signal measurement logic to include origin tracking and structured payload validation.
- Improved test coverage for signal measurement, ensuring robust validation of changes and accurate artifact handling.
- Refactored signal components to streamline data processing and improve overall functionality.
…easurements

- Simplified app state management by removing unused properties and consolidating state updates.
- Introduced a new Circular buffer for managing measurements, enhancing data handling efficiency.
- Refactored decision handling logic to utilize the new decisionStore, improving clarity and functionality.
- Added new components for dashboard visualization, including Canvas and FluidLegend, to enhance user interface.
- Removed deprecated decision funnel logic to streamline the codebase and improve maintainability.
- Removed the `smallnest/ringbuffer` dependency from `go.mod` and `go.sum` as it was no longer needed.
- Refactored the `measurements` store to improve state management and streamline data handling.
- Updated tests to reflect changes in the measurements logic, ensuring robust validation of the new structure.
- Enhanced the `decisions` store to utilize the updated measurements handling, improving overall functionality.
- Added tests for handling pending orders and stoplosses, ensuring robust validation of order lifecycle management.
- Introduced logic to refresh entry block status based on stoploss conditions, improving decision-making in order processing.
- Refactored existing methods to streamline order quantity calculations and enhance overall functionality.
- Updated test cases to reflect changes in order handling and ensure accurate processing of market and limit orders.
- Removed the `pending` field from the Desk struct, simplifying order management.
- Refactored stoploss state handling to utilize a structured snapshot, enhancing clarity and maintainability.
- Updated methods to directly manipulate stoploss state attributes, improving performance and readability.
- Enhanced tests to validate changes in stoploss behavior and ensure robust handling of order states.
- Removed unused functions related to stoploss state management, streamlining the codebase.
- Updated WebSocket routing to handle unrouted artifact roles, improving error management.
- Refactored measurements handling to ensure stability during updates, maintaining the integrity of the measurements map.
- Introduced new tests to validate the stability of measurements while updating the touched origin, ensuring robust order management.
- Enhanced the Circular buffer implementation for measurements, improving data handling efficiency.
- Removed deprecated test files to streamline the codebase and improve maintainability.
- Introduced DEFAULT_KERNELS for consistent kernel management in app state.
- Updated measurements handling to include regime data, improving measurement accuracy.
- Enhanced Pulse component to display rejection messages based on decision store updates.
- Refactored health components to replace "Measured" with "Healthy" for clarity.
- Improved WebSocket routing to accommodate new regime artifacts, ensuring robust data flow.
- Added tests to validate regime handling and ensure accurate measurement updates.
…umentation and improve clarity on signal processing principles.
- Introduced synchronization for concurrent access to WebSocket connections, ensuring thread safety.
- Updated live invariant tests to utilize configurable timeout values for improved maintainability.
- Added a new test for median absolute value calculation, enhancing statistical validation.
- Refactored Crypto component to streamline balance handling and improve error management.
- Enhanced signal measurement tests to validate quiet regime behavior, ensuring accurate signal processing.
- Refactored the Desk struct to simplify order management by removing unnecessary fields and introducing structured components for balances, ticker, and orders.
- Updated go.mod to include new dependencies for Gorilla WebSocket and Kraken API, enhancing WebSocket functionality and API integration.
- Removed outdated files and tests related to previous implementations, streamlining the codebase for better maintainability.
- Enhanced documentation in AGENTS.md to clarify principles and best practices for signal processing and order management.
- Refactored the Broker component to improve order management and balance handling by introducing structured types and simplifying the update logic.
- Added new tests for balance book, capital reserve, and pending order updates to ensure robust validation of order lifecycle and state management.
- Updated dependencies in go.mod to include necessary packages for improved functionality and maintainability.
- Removed outdated files and streamlined the codebase for better clarity and performance.
- Added new category types: Laminar Resonance, Turbulent Resonance, and Equilibrium to the category system for improved classification.
- Implemented a new function, KnownCategory, to validate category types and ensure robustness in measurement handling.
- Enhanced ApplyClassifier method to include additional validation checks for measurement parameters, ensuring data integrity.
- Updated tests to validate the new measurement readiness logic and category handling, improving overall test coverage and reliability.
- Replaced references to the outdated `datura` package with the new `symm/cognitive/dmt` package across multiple files, ensuring consistency in the codebase.
- Updated the `go.mod` and `go.sum` files to remove unused dependencies and reflect the changes in package imports.
- Refactored test cases to align with the new frame structure, enhancing clarity and maintainability in the testing framework.
- Improved the fixture generation logic to utilize frames instead of artifacts, streamlining the data handling process.
- Added new indirect dependencies including `capnproto.org/go/capnp/v3`, `github.com/colega/zeropool`, and others to `go.mod` and `go.sum` for enhanced functionality.
- Replaced references to the outdated `dmt` package with the new `theapemachine/datura/dmt` package in multiple files, ensuring consistency and improved integration.
- Removed the obsolete `cognitive` package files, streamlining the codebase and enhancing maintainability.
- Updated import paths in `optimize.go` and `root.go` to reflect the new package structure, improving clarity in the codebase.
- Updated references from the `logic` package to the new `types` package across multiple files, ensuring consistency in type usage.
- Refactored the `Holdings` method in the `BalanceBook` and `Desk` components to utilize the new `types.Holdings` structure.
- Adjusted action handling in the `Desk` and `OrderFactory` components to align with the new `types.Action` structure, improving clarity and maintainability.
- Removed obsolete test files and streamlined the codebase by deleting unused components, enhancing overall performance and readability.
- Deleted obsolete files related to the broker's balance, capital, order, and pending order functionalities, streamlining the codebase.
- Removed associated test files to enhance maintainability and reduce clutter in the repository.
- This cleanup improves overall performance and clarity in the broker component structure.
- Refactored the Desk component to enhance order management by introducing a structured approach for handling positions and executions.
- Updated the `go.mod` file to include the `github.com/google/uuid` package as an indirect dependency, improving UUID handling.
- Added new tests for the Desk component to validate the handling of open positions and UI forwarding, ensuring robust functionality.
- Streamlined the codebase by removing obsolete imports and enhancing overall maintainability.
- Integrated appStore into the instruments and terminal components to manage focus symbols more effectively.
- Refactored SignalDetail and CausalLadder components to utilize appStore for focus symbol retrieval, improving state management.
- Updated health metrics and decision-making components to reflect changes in focus symbol handling, enhancing overall functionality.
- Added new metrics and visualizations in the DecisionsSurface and HealthPanel components for better user insights.
- Improved websocket handling to ensure timely updates of instrument data across connected clients, enhancing real-time performance.
- Introduced order management capabilities in the Desk component by adding a new channel for orders and updating the Run method to handle incoming order messages.
- Updated tests to validate the handling of balance, execution, and order payloads, ensuring robust functionality and accurate UI forwarding.
- Refactored data structures to utilize json.RawMessage for improved flexibility in handling different payload types.
- Enhanced the PaperOrder type and related methods to support the new order management features, improving overall integration with the Kraken API.
- Introduced cognitive priors in the decision-making process, allowing for dynamic adjustments based on market conditions.
- Enhanced the decision runtime to incorporate prior settings, improving the accuracy of solver controls.
- Updated tests to validate the integration of cognitive priors and ensure correct behavior of the decision clock with sparse events.
- Refactored category handling in physical evidence to utilize the new canonical category index, improving consistency across the codebase.
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 567 files, which is 417 over the limit of 150.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5f7ef937-49b2-43cd-9353-e78e1a300e41

📥 Commits

Reviewing files that changed from the base of the PR and between 972b7cd and a79fba2.

⛔ Files ignored due to path filters (20)
  • frontend/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • frontend/public/scichart/scichart2d-nosimd.wasm is excluded by !**/*.wasm
  • frontend/public/scichart/scichart2d.wasm is excluded by !**/*.wasm
  • frontend/public/scichart/scichart3d-nosimd.wasm is excluded by !**/*.wasm
  • frontend/public/scichart/scichart3d.wasm is excluded by !**/*.wasm
  • frontend/tmp/screenshots/dash.png is excluded by !**/*.png
  • frontend/tmp/screenshots/dash2.png is excluded by !**/*.png
  • frontend/tmp/screenshots/dash3.png is excluded by !**/*.png
  • frontend/tmp/screenshots/inspector.png is excluded by !**/*.png
  • frontend/tmp/screenshots/palette.png is excluded by !**/*.png
  • frontend/tmp/screenshots/real_dash.png is excluded by !**/*.png
  • go.sum is excluded by !**/*.sum
  • go.work is excluded by !**/*.work
  • go.work.sum is excluded by !**/*.sum
  • terminal1.png is excluded by !**/*.png
  • terminal2.png is excluded by !**/*.png
  • terminal3.png is excluded by !**/*.png
  • terminal4.png is excluded by !**/*.png
  • terminal5.png is excluded by !**/*.png
  • terminal6.png is excluded by !**/*.png
📒 Files selected for processing (567)
  • .cursor/commands/do-it-right.md
  • .cursor/commands/review.md
  • .cursor/rules/ponytail.mdc
  • .github/workflows/verify.yml
  • .gitignore
  • .vscode/settings.json
  • AGENTS.md
  • Makefile
  • README.md
  • REVIEW.md
  • audit/writer.go
  • broker/desk.go
  • broker/desk_test.go
  • broker/position.go
  • broker/stoploss.go
  • cmd/cfg/config.yml
  • cmd/root.go
  • frontend/README.md
  • frontend/biome.json
  • frontend/components.json
  • frontend/package.json
  • frontend/public/scichart/scichart2d.js
  • frontend/public/scichart/scichart3d.js
  • frontend/src/app.css
  • frontend/src/collections/actions.ts
  • frontend/src/collections/app.ts
  • frontend/src/collections/balance.ts
  • frontend/src/collections/balances.ts
  • frontend/src/collections/causal.ts
  • frontend/src/collections/circular.ts
  • frontend/src/collections/cognitive.test.ts
  • frontend/src/collections/cognitive.ts
  • frontend/src/collections/decisions.ts
  • frontend/src/collections/diagnostics.ts
  • frontend/src/collections/executions.ts
  • frontend/src/collections/frames.ts
  • frontend/src/collections/instruments.ts
  • frontend/src/collections/manifold.ts
  • frontend/src/collections/measurements.ts
  • frontend/src/collections/orders.bench.ts
  • frontend/src/collections/orders.test.ts
  • frontend/src/collections/orders.ts
  • frontend/src/collections/playbook.test.ts
  • frontend/src/collections/playbook.ts
  • frontend/src/collections/positions.bench.ts
  • frontend/src/collections/positions.test.ts
  • frontend/src/collections/positions.ts
  • frontend/src/collections/resonance.ts
  • frontend/src/collections/signals.bench.ts
  • frontend/src/collections/signals.test.ts
  • frontend/src/collections/signals.ts
  • frontend/src/collections/status.ts
  • frontend/src/collections/terminal.ts
  • frontend/src/collections/tick.ts
  • frontend/src/components/ThemeToggle.tsx
  • frontend/src/components/audit.tsx
  • frontend/src/components/charts/cognitive/CognitivePanel.tsx
  • frontend/src/components/charts/confidence/Gauges.tsx
  • frontend/src/components/charts/confidence/SignalHeatmap.tsx
  • frontend/src/components/charts/confidence/SignalSurpriseHeatmap.tsx
  • frontend/src/components/charts/confidence/confidence-subchart.ts
  • frontend/src/components/charts/confidence/draw-signal-gauge.ts
  • frontend/src/components/charts/confidence/gauge-frame.ts
  • frontend/src/components/charts/confidence/surprise-subchart.ts
  • frontend/src/components/charts/fluid/SurfaceChart.tsx
  • frontend/src/components/charts/fluid/fluid-grid-smoothing.ts
  • frontend/src/components/charts/fluid/fluid-grid.test.ts
  • frontend/src/components/charts/fluid/fluid-grid.ts
  • frontend/src/components/charts/fluid/init-fluid-surface-chart.ts
  • frontend/src/components/charts/fluid/theme.ts
  • frontend/src/components/charts/manifold/ManifoldSurfaceChart.tsx
  • frontend/src/components/charts/manifold/init-manifold-surface-chart.ts
  • frontend/src/components/charts/manifold/manifold-camera.test.ts
  • frontend/src/components/charts/manifold/manifold-camera.ts
  • frontend/src/components/charts/manifold/manifold-grid.test.ts
  • frontend/src/components/charts/manifold/manifold-grid.ts
  • frontend/src/components/charts/prediction/PredictionChart.tsx
  • frontend/src/components/charts/prediction/init-prediction-chart.ts
  • frontend/src/components/charts/prediction/prediction-chart-series.ts
  • frontend/src/components/charts/resonance/ResonanceXRayChart.tsx
  • frontend/src/components/charts/resonance/init-resonance-constellation-chart.ts
  • frontend/src/components/charts/resonance/init-resonance-latent-chart.ts
  • frontend/src/components/charts/resonance/init-resonance-universe-heatmap.test.ts
  • frontend/src/components/charts/resonance/init-resonance-universe-heatmap.ts
  • frontend/src/components/charts/resonance/init-resonance-xray-chart.ts
  • frontend/src/components/charts/resonance/latent-camera.test.ts
  • frontend/src/components/charts/resonance/latent-camera.ts
  • frontend/src/components/charts/resonance/resonance-universe-frame.test.ts
  • frontend/src/components/charts/resonance/resonance-universe-frame.ts
  • frontend/src/components/charts/resonance/resonance-xray-frame.test.ts
  • frontend/src/components/charts/resonance/resonance-xray-frame.ts
  • frontend/src/components/charts/shared/financial-chart-utils.test.ts
  • frontend/src/components/charts/shared/financial-chart-utils.ts
  • frontend/src/components/charts/shared/theme.ts
  • frontend/src/components/charts/shared/volume-palette-provider.ts
  • frontend/src/components/charts/spider/init.ts
  • frontend/src/components/charts/spider/spider.tsx
  • frontend/src/components/charts/spider/theme.ts
  • frontend/src/components/charts/tabbed.test.tsx
  • frontend/src/components/charts/tabbed.tsx
  • frontend/src/components/charts/trade/TradeChart.tsx
  • frontend/src/components/charts/trade/init-trade-chart.bench.ts
  • frontend/src/components/charts/trade/init-trade-chart.test.ts
  • frontend/src/components/charts/trade/init-trade-chart.ts
  • frontend/src/components/charts/trade/stop-loss-annotation.test.ts
  • frontend/src/components/charts/trade/stop-loss-annotation.ts
  • frontend/src/components/charts/trade/theme.ts
  • frontend/src/components/dashboard/canvas.tsx
  • frontend/src/components/dashboard/fluid.tsx
  • frontend/src/components/dashboard/header.tsx
  • frontend/src/components/dashboard/pulse.tsx
  • frontend/src/components/decisions.tsx
  • frontend/src/components/diagnostics/SignalSparkline.tsx
  • frontend/src/components/diagnostics/SystemHealthCell.tsx
  • frontend/src/components/diagnostics/signal-panel.tsx
  • frontend/src/components/header.tsx
  • frontend/src/components/hint.tsx
  • frontend/src/components/kernel/detail.tsx
  • frontend/src/components/kernel/inspector.tsx
  • frontend/src/components/kernel/meter.tsx
  • frontend/src/components/kernel/row.tsx
  • frontend/src/components/layout/mode-toggle.tsx
  • frontend/src/components/layout/navigation.tsx
  • frontend/src/components/layout/not-found.tsx
  • frontend/src/components/layout/page.tsx
  • frontend/src/components/metric.tsx
  • frontend/src/components/panels/data/audit-data-provider.bench.ts
  • frontend/src/components/panels/data/audit-data-provider.test.ts
  • frontend/src/components/panels/data/audit-data-provider.ts
  • frontend/src/components/panels/data/decisions-data-provider.ts
  • frontend/src/components/panels/data/trade-history-data-provider.bench.ts
  • frontend/src/components/panels/data/trade-history-data-provider.test.ts
  • frontend/src/components/panels/data/trade-history-data-provider.ts
  • frontend/src/components/panels/data/trades-data-provider.bench.ts
  • frontend/src/components/panels/data/trades-data-provider.test.ts
  • frontend/src/components/panels/data/trades-data-provider.ts
  • frontend/src/components/panels/data/wallet-data-provider.ts
  • frontend/src/components/panels/positions.test.tsx
  • frontend/src/components/panels/positions.tsx
  • frontend/src/components/sidebar-section.tsx
  • frontend/src/components/terminal/allocation-side.bench.ts
  • frontend/src/components/terminal/allocation-side.test.ts
  • frontend/src/components/terminal/allocation-side.tsx
  • frontend/src/components/terminal/canvas.ts
  • frontend/src/components/terminal/charts.tsx
  • frontend/src/components/terminal/cognitive-viz.ts
  • frontend/src/components/terminal/context.tsx
  • frontend/src/components/terminal/cortex-panels.tsx
  • frontend/src/components/terminal/cortex-tree.ts
  • frontend/src/components/terminal/dashboard-rail.tsx
  • frontend/src/components/terminal/decision-format.ts
  • frontend/src/components/terminal/decision-side.tsx
  • frontend/src/components/terminal/decisions-surface.tsx
  • frontend/src/components/terminal/health.test.ts
  • frontend/src/components/terminal/health.tsx
  • frontend/src/components/terminal/kernel-list.tsx
  • frontend/src/components/terminal/kernel-meta.ts
  • frontend/src/components/terminal/kernel-readout.ts
  • frontend/src/components/terminal/kernels.ts
  • frontend/src/components/terminal/palette.tsx
  • frontend/src/components/terminal/panels.tsx
  • frontend/src/components/terminal/scoped-frame.ts
  • frontend/src/components/terminal/signals-surface.bench.ts
  • frontend/src/components/terminal/signals-surface.tsx
  • frontend/src/components/terminal/symbol-focus.tsx
  • frontend/src/components/terminal/xray-layers.tsx
  • frontend/src/components/trade-history.tsx
  • frontend/src/components/trades.tsx
  • frontend/src/components/ui/accordion.tsx
  • frontend/src/components/ui/alert-dialog.tsx
  • frontend/src/components/ui/alert.tsx
  • frontend/src/components/ui/autocomplete.tsx
  • frontend/src/components/ui/avatar.tsx
  • frontend/src/components/ui/badge.tsx
  • frontend/src/components/ui/breadcrumb.tsx
  • frontend/src/components/ui/button.tsx
  • frontend/src/components/ui/calendar.tsx
  • frontend/src/components/ui/card.tsx
  • frontend/src/components/ui/chart.tsx
  • frontend/src/components/ui/checkbox-group.tsx
  • frontend/src/components/ui/checkbox.tsx
  • frontend/src/components/ui/collapsible.tsx
  • frontend/src/components/ui/combobox.tsx
  • frontend/src/components/ui/command.tsx
  • frontend/src/components/ui/dialog.tsx
  • frontend/src/components/ui/drag-drop.tsx
  • frontend/src/components/ui/drawer.tsx
  • frontend/src/components/ui/empty.tsx
  • frontend/src/components/ui/field.tsx
  • frontend/src/components/ui/fieldset.tsx
  • frontend/src/components/ui/flex.tsx
  • frontend/src/components/ui/form.tsx
  • frontend/src/components/ui/frame.tsx
  • frontend/src/components/ui/grid.tsx
  • frontend/src/components/ui/group.tsx
  • frontend/src/components/ui/input-group.tsx
  • frontend/src/components/ui/input.tsx
  • frontend/src/components/ui/kbd.tsx
  • frontend/src/components/ui/label.tsx
  • frontend/src/components/ui/menu.tsx
  • frontend/src/components/ui/meter.tsx
  • frontend/src/components/ui/number-field.tsx
  • frontend/src/components/ui/otp-field.tsx
  • frontend/src/components/ui/pagination.tsx
  • frontend/src/components/ui/popover.tsx
  • frontend/src/components/ui/preview-card.tsx
  • frontend/src/components/ui/progress.tsx
  • frontend/src/components/ui/radio-group.tsx
  • frontend/src/components/ui/scroll-area.tsx
  • frontend/src/components/ui/select.tsx
  • frontend/src/components/ui/separator.tsx
  • frontend/src/components/ui/sheet.tsx
  • frontend/src/components/ui/sidebar.tsx
  • frontend/src/components/ui/skeleton.tsx
  • frontend/src/components/ui/slider.tsx
  • frontend/src/components/ui/spinner.tsx
  • frontend/src/components/ui/switch.tsx
  • frontend/src/components/ui/table.tsx
  • frontend/src/components/ui/tabs.tsx
  • frontend/src/components/ui/textarea.tsx
  • frontend/src/components/ui/toast.tsx
  • frontend/src/components/ui/toggle-group.tsx
  • frontend/src/components/ui/toggle.tsx
  • frontend/src/components/ui/toolbar.tsx
  • frontend/src/components/ui/tooltip.tsx
  • frontend/src/components/ui/typography.tsx
  • frontend/src/components/verdict.tsx
  • frontend/src/hooks/use-media-query.ts
  • frontend/src/lib/capnp/artifact.capnp.d.ts
  • frontend/src/lib/capnp/artifact.capnp.js
  • frontend/src/lib/capnp/artifact.ts
  • frontend/src/lib/capnp/read-artifact.test.ts
  • frontend/src/lib/capnp/read-artifact.ts
  • frontend/src/lib/symm/events.ts
  • frontend/src/lib/symm/frame-router.ts
  • frontend/src/lib/symm/use-dashboard-data.ts
  • frontend/src/lib/symm/use-store-snapshot.ts
  • frontend/src/lib/symm/use-symm-ui.ts
  • frontend/src/lib/utils.ts
  • frontend/src/providers/gauge-chain.test.ts
  • frontend/src/providers/global-frames.ts
  • frontend/src/providers/websocket-handlers.test.ts
  • frontend/src/providers/websocket-handlers.ts
  • frontend/src/providers/websocket.bench.ts
  • frontend/src/providers/websocket.test.ts
  • frontend/src/providers/websocket.ts
  • frontend/src/routeTree.gen.ts
  • frontend/src/routes/-cortex.test.ts
  • frontend/src/routes/-xray.test.ts
  • frontend/src/routes/__root.tsx
  • frontend/src/routes/allocation.tsx
  • frontend/src/routes/cortex.tsx
  • frontend/src/routes/decisions.tsx
  • frontend/src/routes/diagnostics.tsx
  • frontend/src/routes/index.tsx
  • frontend/src/routes/signals.tsx
  • frontend/src/routes/xray.tsx
  • frontend/src/styles.css
  • frontend/src/types/measurement.ts
  • frontend/tmp/.thumbnail
  • frontend/tmp/SYMM Terminal-print-u7pu5f.dc.html
  • frontend/tmp/SYMM Terminal.dc.html
  • frontend/tmp/support.js
  • frontend/tsconfig.typecheck.json
  • frontend/vite.capnp-cjs-to-esm.ts
  • frontend/vite.config.ts
  • go.mod
  • kraken/balance.go
  • kraken/book.go
  • kraken/book_test.go
  • kraken/execution.go
  • kraken/futures/endpoint.go
  • kraken/futures/websocket.go
  • kraken/level3.go
  • kraken/level3_test.go
  • kraken/ohlc.go
  • kraken/ohlc_test.go
  • kraken/order.go
  • kraken/order_test.go
  • kraken/paper.go
  • kraken/paper/response/balances.go
  • kraken/paper/response/balances_test.go
  • kraken/paper/response/execution.go
  • kraken/paper/response/fill.go
  • kraken/paper/response/fill_test.go
  • kraken/paper/response/latency.go
  • kraken/paper/response/order.go
  • kraken/paper/response/preflight.go
  • kraken/paper/response/slippage.go
  • kraken/paper/rest.go
  • kraken/paper/rest_test.go
  • kraken/paper/websocket.go
  • kraken/paper/websocket_test.go
  • kraken/paper_test.go
  • kraken/private/rest.go
  • kraken/private/rest_test.go
  • kraken/private/websocket.go
  • kraken/public/endpoint.go
  • kraken/public/rest.go
  • kraken/public/subscription.go
  • kraken/public/subscription_test.go
  • kraken/public/websocket.go
  • kraken/public/websocket_test.go
  • kraken/ticker.go
  • kraken/ticker_test.go
  • kraken/trade.go
  • kraken/trade_test.go
  • kraken/types/socket.go
  • kraken/types/socketmessage.go
  • kraken/types/socketmessage_test.go
  • kraken/types/token.go
  • kraken/types/token_test.go
  • kraken/types/unmarshaler.go
  • kraken/websocket/l3.go
  • kraken/websocket/l3_test.go
  • kraken/websocket/paper.go
  • kraken/websocket/paper_test.go
  • kraken/websocket/private.go
  • kraken/websocket/public.go
  • kraken/websocket/public_test.go
  • kraken/websocket/socket.go
  • kraken/websocket/stream.go
  • kraken/websocket/stream_test.go
  • logic/action.go
  • logic/action_test.go
  • logic/balances.go
  • logic/boundary.go
  • logic/boundary_error.go
  • logic/boundary_frame.go
  • logic/boundary_test.go
  • logic/branch.go
  • logic/category.go
  • logic/causal.go
  • logic/clamp.go
  • logic/clamp_role.go
  • logic/clamp_schema.go
  • logic/cognitive.go
  • logic/cognitive_test.go
  • logic/condition.go
  • logic/decision.go
  • logic/decision_gate.go
  • logic/decision_intent.go
  • logic/decision_test.go
  • logic/decision_validation.go
  • logic/eigenmode.go
  • logic/eigenmode_test.go
  • logic/entity.go
  • logic/evidence.go
  • logic/feedback.go
  • logic/field.go
  • logic/frame.go
  • logic/loop.go
  • logic/operand.go
  • logic/operand_test.go
  • logic/order.go
  • logic/physical.go
  • logic/physical_config.go
  • logic/physical_evidence.go
  • logic/physical_test.go
  • logic/position.go
  • logic/regime.go
  • logic/rules/tree.yml
  • logic/runtime.go
  • logic/signal.go
  • logic/subject.go
  • logic/tree.go
  • logic/walk.go
  • logic/walk_test.go
  • market/action.go
  • market/cross_section.go
  • market/feedback.go
  • market/forward.go
  • market/forward_calibrator.go
  • market/regime.go
  • market/signal.go
  • market/story.go
  • market/symbol.go
  • scripts/dump-repo.py
  • scripts/tmp_dial_main.go
  • scripts/verify.sh
  • signal/causal/nodes.go
  • signal/causal/signal.go
  • signal/causal/signal_test.go
  • signal/compute/serial_pool.go
  • signal/compute/serial_pool_test.go
  • signal/correlation/signal.go
  • signal/correlation/signal_test.go
  • signal/correlation/ticker.go
  • signal/cvd/signal.go
  • signal/cvd/signal_test.go
  • signal/cvd/trade.go
  • signal/depthflow/book.go
  • signal/depthflow/signal.go
  • signal/depthflow/signal_test.go
  • signal/depthflow/trade.go
  • signal/exhaust/book.go
  • signal/exhaust/engine.go
  • signal/exhaust/signal.go
  • signal/exhaust/signal_test.go
  • signal/exhaust/trade.go
  • signal/fluid/book.go
  • signal/fluid/book_quality.go
  • signal/fluid/debug_test.go
  • signal/fluid/dynamics.go
  • signal/fluid/dynamics_test.go
  • signal/fluid/facts.go
  • signal/fluid/facts_test.go
  • signal/fluid/fixture_test.go
  • signal/fluid/grid.go
  • signal/fluid/grid_remap.go
  • signal/fluid/grid_sources.go
  • signal/fluid/grid_test.go
  • signal/fluid/grid_velocity.go
  • signal/fluid/marketdata.go
  • signal/fluid/measure_batch.go
  • signal/fluid/observe.go
  • signal/fluid/registry.go
  • signal/fluid/signal.go
  • signal/fluid/signal_test.go
  • signal/fluid/snapshot_test.go
  • signal/fluid/symbol.go
  • signal/fluid/symbol_config.go
  • signal/fluid/symbol_test.go
  • signal/fluid/ticker.go
  • signal/fluid/trade.go
  • signal/hawkes/hawkes_payload_test.go
  • signal/hawkes/search_test.go
  • signal/hawkes/signal.go
  • signal/hawkes/signal_test.go
  • signal/hawkes/trade.go
  • signal/leadlag/leadlag_payload_test.go
  • signal/leadlag/section.go
  • signal/leadlag/section_correlation.go
  • signal/leadlag/signal.go
  • signal/leadlag/signal_test.go
  • signal/leadlag/ticker.go
  • signal/leadlag/ticker_test.go
  • signal/liquidity/features_frame_test.go
  • signal/liquidity/signal.go
  • signal/liquidity/signal_test.go
  • signal/liquidity/ticker.go
  • signal/manifold/display_carriers_test.go
  • signal/manifold/field.go
  • signal/manifold/field_return_test.go
  • signal/manifold/field_test.go
  • signal/manifold/field_worker.go
  • signal/manifold/instrument.go
  • signal/manifold/manifold_payload_test.go
  • signal/manifold/observe.go
  • signal/manifold/observe_test.go
  • signal/manifold/signal.go
  • signal/manifold/signal_test.go
  • signal/manifold/snapshot.go
  • signal/manifold/snapshot_publish_test.go
  • signal/manifold/snapshot_reading_test.go
  • signal/manifold/snapshot_test.go
  • signal/manifold/ticksize.go
  • signal/manifold/universe.go
  • signal/manifold/universe_test.go
  • signal/pumpdump/book.go
  • signal/pumpdump/signal.go
  • signal/pumpdump/signal_test.go
  • signal/pumpdump/ticker.go
  • signal/pumpdump/ticker_test.go
  • signal/pumpdump/trade.go
  • signal/resonance/attention.go
  • signal/resonance/baselines.go
  • signal/resonance/baselines_test.go
  • signal/resonance/batch_engine.go
  • signal/resonance/batch_engine_cpu.go
  • signal/resonance/batch_engine_cpu_bench_test.go
  • signal/resonance/batch_engine_cpu_test.go
  • signal/resonance/batch_engine_metal.go
  • signal/resonance/feed_ring.go
  • signal/resonance/marketstate.go
  • signal/resonance/observe.go
  • signal/resonance/observe_peek_test.go
  • signal/resonance/sense.go
  • signal/resonance/sense_test.go
  • signal/resonance/sensory.go
  • signal/resonance/sensory_facts.go
  • signal/resonance/settle_batch.go
  • signal/resonance/settle_scopes_test.go
  • signal/resonance/signal.go
  • signal/resonance/signal_test.go
  • signal/resonance/slot_registry_test.go
  • signal/resonance/snapshot.go
  • signal/resonance/testfixtures_test.go
  • signal/resonance/universe.go
  • signal/resonance/universe_test.go
  • signal/resonance/wire_layers.go
  • signal/sentiment/signal.go
  • signal/sentiment/signal_test.go
  • signal/sentiment/ticker.go
  • signal/toxicity/engine.go
  • signal/toxicity/level3.go
  • signal/toxicity/signal.go
  • signal/toxicity/signal_test.go
  • signal/toxicity/trade.go
  • symm
  • test.md
  • tests/fixture.go
  • tests/fixture_test.go
  • tests/fixtures/balances/fixture.go
  • tests/fixtures/balances/fixture_test.go
  • tests/fixtures/balances/fixtures/snapshot.json
  • tests/fixtures/balances/fixtures/update.json
  • tests/fixtures/book/fixture.go
  • tests/fixtures/book/fixture_test.go
  • tests/fixtures/book/fixtures/snapshot.json
  • tests/fixtures/book/fixtures/update.json
  • tests/fixtures/candles/fixture.go
  • tests/fixtures/candles/fixture_test.go
  • tests/fixtures/candles/fixtures/snapshot.json
  • tests/fixtures/candles/fixtures/update.json
  • tests/fixtures/heartbeat/fixture.go
  • tests/fixtures/heartbeat/fixture_test.go
  • tests/fixtures/heartbeat/fixtures/update.json
  • tests/fixtures/instrument/fixture.go
  • tests/fixtures/instrument/fixture_test.go
  • tests/fixtures/instrument/fixtures/snapshot.json
  • tests/fixtures/instrument/fixtures/update.json
  • tests/fixtures/level3/fixture.go
  • tests/fixtures/level3/fixture_test.go
  • tests/fixtures/level3/fixtures/snapshot.json
  • tests/fixtures/level3/fixtures/update.json
  • tests/fixtures/status/fixture.go
  • tests/fixtures/status/fixture_test.go
  • tests/fixtures/status/fixtures/update.json
  • tests/fixtures/ticker/fixture.go
  • tests/fixtures/ticker/fixture_test.go
  • tests/fixtures/ticker/fixtures/snapshot.json
  • tests/fixtures/ticker/fixtures/update.json
  • tests/fixtures/trade/fixture.go
  • tests/fixtures/trade/fixture_test.go
  • tests/fixtures/trade/fixtures/snapshot.json
  • tests/fixtures/trade/fixtures/update.json
  • trader/book.go
  • trader/book_test.go
  • trader/cortex.go
  • trader/cortex_test.go
  • trader/cortex_topology.go
  • trader/cortex_topology_test.go
  • trader/crypto.go
  • trader/crypto_test.go
  • trader/level3.go
  • trader/level3_test.go
  • trader/ohlc.go
  • trader/ohlc_test.go
  • trader/replay_helpers_test.go
  • trader/signal.go
  • trader/signal_integration_test.go
  • trader/signal_test.go
  • trader/ticker.go
  • trader/ticker_test.go
  • trader/trade.go
  • trader/trade_test.go
  • types/category.go
  • types/cross_section.go
  • types/input.go
  • types/measurement.go
  • types/signal.go
  • types/source.go
  • types/state.go
  • types/updater.go
  • ui/hub.go
  • ui/hub_test.go

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch curious

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@TheApeMachine
TheApeMachine merged commit 6bad663 into master Jul 6, 2026
1 of 2 checks passed

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request overhauls the symm trading system by removing the qpool dependency, refactoring the broker Desk to manage websocket streams directly, and introducing a dedicated Position management structure. It also replaces the frontend dashboard with a lightweight terminal layout and adds a critical codebase review document. The review feedback highlights several critical concurrency and reliability issues in the new broker code, including data races on Desk fields, a blocking channel send on the UI update path, and non-atomic map updates in Buy(). Additionally, the feedback addresses a double-selling risk in Sell(), duplicate fields in the Position struct causing stale data bugs, flaky test sleeps, and performance inefficiencies from unthrottled UI updates.

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.

Comment thread broker/desk.go
Comment on lines 22 to 33
type Desk struct {
ctx context.Context
cancel context.CancelFunc
pool *qpool.Q[any]
tree *dmt.Tree
ctx context.Context
cancel context.CancelFunc
channels map[string]chan []byte
public websocket.Socket
private websocket.Private
balance *kraken.BalanceDataSlice
executions []*kraken.ExecutionDataSlice
orders *kraken.PaperOrderSlice
positions *sync.Map
UIForward chan []byte
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

Critical Data Race Hazard

There is a critical data race on the desk.balance field (and potentially desk.executions / desk.orders).

  • Write Path: The Run() goroutine updates desk.balance concurrently when a new balance message is received:
    desk.balance = kraken.NewBalanceDataSlice(msg)
  • Read Path: Other goroutines (such as the trader's tick loop) concurrently read desk.balance via Ready() and Buy():
    "balance": desk.balance

In Go, concurrent read and write access to a non-atomic pointer/slice variable without synchronization is a data race, which can lead to undefined behavior, memory corruption, or panics.

Recommendation

Add a sync.RWMutex to the Desk struct and use it to synchronize access to balance, executions, and orders across all goroutines.

Suggested change
type Desk struct {
ctx context.Context
cancel context.CancelFunc
pool *qpool.Q[any]
tree *dmt.Tree
ctx context.Context
cancel context.CancelFunc
channels map[string]chan []byte
public websocket.Socket
private websocket.Private
balance *kraken.BalanceDataSlice
executions []*kraken.ExecutionDataSlice
orders *kraken.PaperOrderSlice
positions *sync.Map
UIForward chan []byte
}
type Desk struct {
ctx context.Context
cancel context.CancelFunc
mu sync.RWMutex
channels map[string]chan []byte
public websocket.Socket
private websocket.Private
balance *kraken.BalanceDataSlice
executions []*kraken.ExecutionDataSlice
orders *kraken.PaperOrderSlice
positions *sync.Map
UIForward chan []byte
}

Comment thread broker/desk.go
out["positions"] = positions
}

desk.UIForward <- out.Marshal()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Blocking Send on UIForward Channel

The channel send desk.UIForward <- out.Marshal() is a blocking operation. If the UI client or receiver is slow, disconnected, or fails to drain the channel, the entire Run() loop will block.

Because Run() is responsible for draining the websocket message channels (desk.channels), blocking here will stop processing incoming market data, balances, and executions. This can lead to Kraken disconnecting the client due to ping timeouts or buffer overflow.

Recommendation

Use a non-blocking select send or dispatch the UI update to a separate goroutine to ensure the hot path of draining websocket channels is never blocked:

select {
case desk.UIForward <- out.Marshal():
default:
	// Drop update or log warning if the UI consumer is falling behind
}
		select {
		case desk.UIForward <- out.Marshal():
		default:
		}

Comment thread broker/desk.go
Comment on lines +177 to +184
positions, ok := desk.positions.LoadOrStore(positionData.Symbol, []*Position{position})

if ok {
desk.positions.Store(
positionData.Symbol,
append(positions.([]*Position), position),
)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Race Condition / Lost Update Hazard in Buy()

The sequence of LoadOrStore followed by Store is not atomic. If two concurrent goroutines call Buy() for the same symbol, both might load the same existing positions slice, append their respective new position, and then call Store. The one that stores last will overwrite the other's write, resulting in a lost position update.

Recommendation

Use a mutex to synchronize updates to the positions map, or use a lock-free concurrent list/slice update pattern. Since Buy is not a high-frequency operation, protecting the map updates with a simple mutex on Desk is the safest and most robust solution.

Comment thread broker/desk.go
Comment on lines +201 to 214
for _, position := range positions.([]*Position) {
err = errors.Join(err, position.Exit())
}

if err != nil {
return errnie.Error(errnie.Err(
errnie.UnprocessableContent,
err.Error(),
err,
))
}

desk.positions.Delete(symbol)
return nil

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Partial Failure and Double-Selling Risk

In Sell(), if there are multiple positions for a symbol and some fail to exit while others succeed, the function returns early due to the non-nil error, and desk.positions.Delete(symbol) is never called. This leaves the successfully exited positions in the active list. If the trader retries the Sell() operation, it will call Exit() again on all positions, including the ones that already successfully exited, leading to double-selling/unintentional shorting.

Recommendation

Only retain positions in the map that actually failed to exit, or remove each position from the active list immediately upon a successful Exit() call.

Comment thread broker/position.go
Comment on lines +22 to +28
type Position struct {
private websocket.Private
mu sync.RWMutex
data PositionData
Symbol string
Qty float64
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Duplicate Fields and Stale Data Bug

The Position struct contains duplicate fields Symbol and Qty both at the root level and inside the nested PositionData struct. In NewPosition, only position.data is initialized; the root Symbol and Qty are left empty. However, in broker/desk_test.go, positions are constructed directly using the root fields.

This causes a major bug in Data(): if a position is constructed directly (with position.data.Symbol == ""), Data() will always return a PositionData with only Symbol and Qty set. Even if Update() is called and updates position.data.Mark and position.data.PnL, position.data.Symbol remains "", so Data() will continue to return 0 for Mark and PnL, completely ignoring all updates!

Recommendation

Remove the duplicate Symbol and Qty fields from the Position struct, and simplify Data() to always return position.data. Update the tests/benchmarks to initialize data: PositionData{Symbol: "...", Qty: ...} instead.

type Position struct {
	private websocket.Private
	mu      sync.RWMutex
	data    PositionData
}

Comment thread broker/position.go
Comment on lines +99 to +111
func (position *Position) Data() PositionData {
position.mu.RLock()
defer position.mu.RUnlock()

if position.data.Symbol == "" {
return PositionData{
Symbol: position.Symbol,
Qty: position.Qty,
}
}

return position.data
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Simplify Data() to Avoid Stale Data Bug

Following the removal of duplicate Symbol and Qty fields from the Position struct, Data() can be simplified to always return position.data directly. This avoids the stale data bug where updates to Mark and PnL are ignored.

Recommendation

Simplify Data() to return position.data directly under a read lock.

func (position *Position) Data() PositionData {
	position.mu.RLock()
	defer position.mu.RUnlock()

	return position.data
}

Comment thread broker/desk_test.go
Comment on lines +222 to +223
desk.positions.Store("BTC/USD", []*Position{{Symbol: "BTC/USD", Qty: 0.01}})
desk.positions.Store("SOL/USD", []*Position{{Symbol: "SOL/USD", Qty: 3.5}})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Update Benchmark to Match Refactored Position Struct

Since the duplicate Symbol and Qty fields are removed from the Position struct, the benchmark should be updated to initialize the nested data field directly.

Recommendation

Update the benchmark to initialize data: PositionData{Symbol: "...", Qty: ...}.

Suggested change
desk.positions.Store("BTC/USD", []*Position{{Symbol: "BTC/USD", Qty: 0.01}})
desk.positions.Store("SOL/USD", []*Position{{Symbol: "SOL/USD", Qty: 3.5}})
desk.positions.Store("BTC/USD", []*Position{{data: PositionData{Symbol: "BTC/USD", Qty: 0.01}}})
desk.positions.Store("SOL/USD", []*Position{{data: PositionData{Symbol: "SOL/USD", Qty: 3.5}}})

Comment thread broker/desk_test.go
Comment on lines +89 to +90
time.Sleep(10 * time.Millisecond)
cancel()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Flaky Test Pattern with time.Sleep

Using time.Sleep(10 * time.Millisecond) to wait for asynchronous goroutines to process messages is a flaky test anti-pattern. If the test environment is under heavy load, 10ms might not be enough for desk.Run() to process all three messages, leading to intermittent test failures.

Recommendation

Instead of sleeping, wait for the expected number of frames (3) to be received on the desk.UIForward channel before calling cancel().

Comment thread broker/desk.go
Comment on lines +119 to +148
positions := make([]PositionData, 0)

desk.positions.Range(func(_ any, value any) bool {
for _, position := range value.([]*Position) {
positions = append(positions, position.Data())
}

return true
})

out := datura.Map[any]{}

if desk.balance != nil {
out["balance"] = desk.balance
}

if len(desk.executions) > 0 {
out["executions"] = desk.executions
}

if desk.orders != nil {
out["orders"] = desk.orders
}

if len(positions) > 0 {
out["positions"] = positions
}

desk.UIForward <- out.Marshal()
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Inefficient UI Updates on Every Message

Currently, on every single message received on any channel (including high-frequency ticker updates), the entire state is marshaled and sent to the UI. This will cause massive CPU usage and allocation churn under live market conditions.

Recommendation

Throttle or debounce UI updates (e.g., using a time.Ticker to send updates at a fixed interval like 100ms or 1s) instead of sending on every single message.

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