Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

🔖 Checkpoint: Edit /workspaces/claude-code-flow/reproduce_issue.py

rUvf6745cd205ef
diff --git a/.claude/checkpoints/1754584156.json b/.claude/checkpoints/1754584156.json
new file mode 100644
index 0000000000..16c23ba9c4
--- /dev/null
+++ b/.claude/checkpoints/1754584156.json
@@ -0,0 +1 @@
+{"branch": "checkpoint/pre-edit-20250807-162916", "file": "/workspaces/claude-code-flow/test_issue_comprehensive.py", "timestamp": "2025-08-07T16:29:16Z", "type": "pre-edit", "original_branch": "swe-bench"}
diff --git a/.claude/checkpoints/1754584158.json b/.claude/checkpoints/1754584158.json
new file mode 100644
index 0000000000..84a4812fe5
--- /dev/null
+++ b/.claude/checkpoints/1754584158.json
@@ -0,0 +1 @@
+{"tag": "checkpoint-20250807-162918", "file": "/workspaces/claude-code-flow/test_issue_comprehensive.py", "timestamp": "2025-08-07T16:29:18Z", "type": "post-edit", "branch": "swe-bench", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 5372 +----------------------------- .claude-flow/metrics/task-metrics.json | 8 +- .claude/checkpoints/1754584104.json | 1 + .claude/checkpoints/1754584106.json | 1 + astropy_fix | 0 test_issue_comprehensive.py | 71 + 7 files changed, 112 insertions(+), 5343 deletions(-) "}
diff --git a/reproduce_issue.py b/reproduce_issue.py
new file mode 100644
index 0000000000..bb941ea498
--- /dev/null
+++ b/reproduce_issue.py
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+"""Reproduce the exact issue from the test."""
+
+import numpy as np
+from astropy import units as u
+from astropy.modeling.models import BlackBody
+
+# From test_blackbody_dimensionless
+T = 3000 * u.K
+r = 1e14 * u.cm
+DL = 100 * u.Mpc
+scale = np.pi * (r / DL) ** 2
+
+print(f"Scale value: {scale}")
+print(f"Scale unit: {scale.unit}")
+print(f"Scale to dimensionless_unscaled: {scale.to_value(u.dimensionless_unscaled)}")
+
+bb1 = BlackBody(temperature=T, scale=scale)
+print(f"\nbb1 (regular dimensionless scale):")
+print(f" bb1.scale.unit: {bb1.scale.unit}")
+print(f" bb1.scale.value: {bb1.scale.value}")
+
+bb2 = BlackBody(temperature=T, scale=scale.to_value(u.dimensionless_unscaled))
+print(f"\nbb2 (float scale from to_value):")
+print(f" bb2.scale.unit: {bb2.scale.unit}")
+print(f" bb2.scale.value: {bb2.scale.value}")
+
+# Check bolometric flux
+flux1 = bb1.bolometric_flux
+flux2 = bb2.bolometric_flux
+
+print(f"\nBolometric fluxes:")
+print(f" bb1.bolometric_flux: {flux1}")
+print(f" bb2.bolometric_flux: {flux2}")
+print(f" Are they equal? {flux1 == flux2}")
+print(f" Values equal? {flux1.value == flux2.value}")
+
+# Let's also test with explicit dimensionless_unscaled Quantity
+bb3 = BlackBody(temperature=T, scale=scale.to(u.dimensionless_unscaled))
+print(f"\nbb3 (dimensionless_unscaled Quantity):")
+print(f" bb3.scale.unit: {bb3.scale.unit}")
+print(f" bb3.scale.value: {bb3.scale.value}")
+flux3 = bb3.bolometric_flux
+print(f" bb3.bolometric_flux: {flux3}")
+print(f" bb3 == bb2? {flux3 == flux2}")
+
+# Test what the original issue report describes
+print("\n--- Original Issue Test ---")
+bb_float = BlackBody(temperature=T, scale=1.0)
+bb_dim_unscaled = BlackBody(temperature=T, scale=1.0 * u.dimensionless_unscaled)
+
+print(f"Float scale flux: {bb_float.bolometric_flux}")
+print(f"Dimensionless_unscaled flux: {bb_dim_unscaled.bolometric_flux}")
+print(f"Are they equal? {bb_float.bolometric_flux == bb_dim_unscaled.bolometric_flux}")
\ No newline at end of file