instance_id stringlengths 10 65 | repo stringlengths 5 59 | pr_number int64 1 313k | task_type stringclasses 1
value | base_commit stringlengths 40 40 | review_commit stringlengths 40 40 | title stringlengths 2 282 | body stringlengths 7 3k | patch stringlengths 202 204k | n_defects int64 1 72 | n_supported int64 1 65 | n_major int64 0 32 | defects stringlengths 140 18.8k | certifier_count int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
shapely__shapely__1902 | shapely/shapely | 1,902 | defect | 6ba799ab9caf6ec67e9609da892a30a8b16ea979 | cc8b0a2df297a5a45d9ac733926dfa449eb80444 | Add transform_resize() and deprecate ops.transform() | This proposal supersedes #1676 . I made a function specification to discuss about. The rationale here being:
- The consolidation of the current `shapely.transform` and `shapely.ops.transform` explored in #1676 by @idanmiara made clear that mixing the two results in the unnecessary addition of cases for which the im... | diff --git a/shapely/coordinates.py b/shapely/coordinates.py
index 03bd3ac97..56a51be5d 100644
--- a/shapely/coordinates.py
+++ b/shapely/coordinates.py
@@ -3,9 +3,15 @@
import numpy as np
import shapely
-from shapely import lib
+from shapely import GeometryType, lib
-__all__ = ["transform", "count_coordinates", ... | 4 | 4 | 4 | [{"id": "G0", "claim": "Add the `interleaved` parameter to `transform_resize` as in the normal `shapely.transform` function.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Remove the try/except fallback that infers whether the transformation is array-wis... | null |
shapely__shapely__1941 | shapely/shapely | 1,941 | defect | dba2704cdadbb5745edf9961f97aaf0c60826e42 | f98819d147b8982bcd2bc4a47826243d93e77134 | ENH: Add parameters `method` and `keep_collapsed` to `make_valid` + improve doc | resolves #1415
- Inspiration used for documentation:
- Blog post by Martin Davis: [fixing invalid geometry with JTS](https://lin-ear-th-inking.blogspot.com/2021/05/fixing-invalid-geometry-with-jts.html)
- Blog post by Paul Ramsey: [waiting-for-postgis-3.2-st_makevalid](https://www.crunchydata.com/blog/wait... | diff --git a/CHANGES.txt b/CHANGES.txt
index cb4a4206c..cabe3bf23 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -19,6 +19,7 @@ Improvements:
signature in the ``transformation`` function.
- The ``include_z`` in ``shapely.transform()`` now also allows ``None``, which
lets it automatically detect the dimensionality... | 12 | 12 | 1 | [{"id": "G0", "claim": "The keep_collapsed docstring should make clear how the parameter relates to the 'linework' method (that it must be True for 'linework'), which M001 asks about and M016 proposes wording for.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G... | null |
shapely__shapely__1968 | shapely/shapely | 1,968 | defect | 38a9021dc6de3d540620ec2696a7bc1ed896249b | b9a6430faaf168de80e737cdb2c4755b00f750aa | ENH: add ordered option to voronoi_polygons | Exposes the option from GEOS 3.12 allowing deterministic order of polygons within the GeometryCollection that is an output of the `voronoi_polygons` (see https://github.com/libgeos/geos/pull/781). Without it, the order is not possible to link to original geometries without using a spatial join.
Where is the best to ... | diff --git a/CHANGES.txt b/CHANGES.txt
index ab916064f..13dd3fdf0 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -20,6 +20,9 @@ Improvements:
- The ``include_z`` in ``shapely.transform()`` now also allows ``None``, which
lets it automatically detect the dimensionality of each input geometry.
- Upgraded the GEOS ver... | 1 | 1 | 0 | [{"id": "G0", "claim": "The version guard `if ordered` fails with the \"ambiguous truth value\" error when `ordered` is passed as an array_like, even though the signature documents `ordered : bool or array_like`, so the check should be rewritten (e.g. `if ordered is not False`).", "category": "correctness", "verdict": ... | null |
shapely__shapely__1969 | shapely/shapely | 1,969 | defect | 38a9021dc6de3d540620ec2696a7bc1ed896249b | 5eb36908393c25a8932210f7cf97ca4b243b7533 | ENH: add coverage_simplify exposing topological simplification of coverages | xref #1570
GEOS supports this simplification for collections of polygons only. Here, I have currently opted for returning other geometries untouched but the correct behaviour is up to a discussion. When checking for correct geom types, nesting og GeometryCollections is not supported and a GeometryCollection of a Geo... | diff --git a/shapely/constructive.py b/shapely/constructive.py
index 35e808fc3..faeb2180a 100644
--- a/shapely/constructive.py
+++ b/shapely/constructive.py
@@ -34,6 +34,7 @@
"oriented_envelope",
"minimum_rotated_rectangle",
"minimum_bounding_circle",
+ "coverage_simplify",
]
@@ -91,7 +92,7 @@ de... | 8 | 8 | 2 | [{"id": "G0", "claim": "The docstring misspells \"simplifiies\" in the simplify_boundary parameter description and should read \"simplifies\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The docstring line misspells \"inclduing\" and should rea... | null |
shapely__shapely__1982 | shapely/shapely | 1,982 | defect | 38a9021dc6de3d540620ec2696a7bc1ed896249b | 818124b8260b56aab8b67f273618dbaa1a499c31 | ENH: add disjoint_subset_union and disjoint_subset_union_all | Exposing `GEOSDisjointSubsetUnion` as `disjoint_subset_union` and `disjoint_subset_union_all`, matching the API of union and coverage_union (assuming coverage_unoin will be fixed as discussed in #1963).
Tests are currently only reusing the tooling for other set operations. Not sure if there's a need to go beyond tha... | diff --git a/CHANGES.txt b/CHANGES.txt
index ab916064f..cb79df0ea 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -20,6 +20,9 @@ Improvements:
- The ``include_z`` in ``shapely.transform()`` now also allows ``None``, which
lets it automatically detect the dimensionality of each input geometry.
- Upgraded the GEOS ver... | 4 | 4 | 1 | [{"id": "G0", "claim": "Move the `disjoint_subset_union_data` static array definition in src/ufuncs.c to just above the `Y_Y_func` definition, where the other `_data` variables that use `Y_Y_func` are defined.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1"... | null |
shapely__shapely__2008 | shapely/shapely | 2,008 | defect | e15799520838f9ba696cc107bc874f07644a474d | 5051fb72d6804bf63dbac6b5e9ad5c077c01bb50 | ENH: add has_m | Add a basic `has_m` unary predicate function, available with GEOS >= 3.12.0.
#### Other changes to note
* Update some related docs for `get_coordinate_dimension`
* Add `has_z` to `UNARY_PREDICATES` for shapely/tests/test_predicates.py | diff --git a/docs/manual.rst b/docs/manual.rst
index 411f35b26..7936dd98f 100644
--- a/docs/manual.rst
+++ b/docs/manual.rst
@@ -914,8 +914,8 @@ example will be shown for each.
.. attribute:: object.has_z
- Returns ``True`` if the feature has not only `x` and `y`, but also `z`
- coordinates for 3D (or so-called,... | 1 | 1 | 0 | [{"id": "G0", "claim": "The test function test_has_m_all_types_zm should be renamed to test_has_z_has_m_all_types_zm, as proposed in the suggestion block.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
shapely__shapely__2094 | shapely/shapely | 2,094 | defect | e7a6479b17daea5e9baa613899424b6719751103 | f0a5363a2651ef13f686906e5e400d7f7eafa35c | ENH: add option `on invalid="fix"` to `from wkb` and `from wkt` | Add the option to "fix" invalid input geometries for `from_wkt` and `from_wkb`.
closes #1342
References:
- #1570
- https://github.com/geopandas/pyogrio/issues/423
- https://github.com/geopandas/geopandas/issues/2791
- https://github.com/geopandas/geopandas/discussions/3336
| diff --git a/CHANGES.txt b/CHANGES.txt
index dc5cac016..5c77715d0 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -24,6 +24,7 @@ Improvements:
- The ``voronoi_polygons`` now accepts the ``ordered`` keyword, optionally forcing the
order of polygons within the GeometryCollection to follow the order of input
coordina... | 3 | 3 | 1 | [{"id": "G0", "claim": "The on_invalid='fix' path in from_wkb should probably have a test case, skipped for GEOS >= 3.11 (the unsupported-GEOS branch).", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new 'fix' docstring wording should state that fixi... | null |
shapely__shapely__2118 | shapely/shapely | 2,118 | defect | cf4aebf74c73316e7e599c21068cfb9d156ca313 | ba6f65288eac7ffdd3d637352d98fd52609eae88 | BUG: fix to_geojson with empty point | Fixes https://github.com/shapely/shapely/issues/2111
Serialization of empty points in GEOS has been fixed in [3.10.2](https://github.com/libgeos/geos/blob/7cb33c988bb0115f4fe107785570ae5786ed2401/NEWS#L73), so I updated the C code and tests to handle that. | diff --git a/shapely/tests/test_io.py b/shapely/tests/test_io.py
index 716118548..3e7071548 100644
--- a/shapely/tests/test_io.py
+++ b/shapely/tests/test_io.py
@@ -1260,9 +1260,13 @@ def test_to_geojson_exceptions():
],
)
def test_to_geojson_point_empty(geom):
- # Pending GEOS ticket: https://trac.osgeo.org/... | 2 | 2 | 0 | [{"id": "G0", "claim": "test_to_geojson_point_empty should verify that an empty point roundtrips correctly (to_geojson then from_geojson) instead of only calling to_geojson and discarding the result.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "A brie... | null |
shapely__shapely__2234 | shapely/shapely | 2,234 | defect | d62b3a9cfc35638789b4a31d2e83bad672a0753f | 34e0325d305225ea861a7bf2b7ed1840b3d8892b | ENH: Add `include_m` to `get_coordinates`, warn with positional args | This enhancement allows `shapely.get_coordinates()` to get M coordinate data with `include_m=True`. For shapely 2.1, this argument is after the keyword-only (`, *,`) marker. A DeprecationWarning is shown if the function is called with positional arguments for `include_z` or `return_index`, since a future version of sha... | diff --git a/shapely/coordinates.py b/shapely/coordinates.py
index 299733446..b09d2b145 100644
--- a/shapely/coordinates.py
+++ b/shapely/coordinates.py
@@ -4,6 +4,7 @@
import shapely
from shapely import lib
+from shapely.decorators import deprecate_positional
__all__ = ["count_coordinates", "get_coordinates", "... | 3 | 1 | 0 | [{"id": "G0", "claim": "On GEOS < 3.10, hasZ is wrongly detected when all Z values are NaN, causing a false hasM detection in coordseq_to_buffer; the correction setting hasZ1/hasZ2 from dims is needed for test_equality_with_nan_z_false with GEOS 3.9.", "category": "correctness", "verdict": "uncertain", "priority": "P1"... | null |
shapely__shapely__2243 | shapely/shapely | 2,243 | defect | e6301ac5c362cdc9ada62aac36d2236e5569e887 | 942d45553b8b5b68bcc5aa841683a3b89b46664a | DEPR: deprecate 'resolution' argument for BaseGeometry.buffer() | Back in shapely-1.8, the `BaseGeometry.buffer()` function used `resolution=`
https://github.com/shapely/shapely/blob/9cf3cdfae7c9aa01b56c7151a51e6a517cceabdd/shapely/geometry/base.py#L541-L543
Since shapely-2.0 this has been renamed `quad_segs=`. This shows a FutureWarning if `resolution` is used. | diff --git a/shapely/geometry/base.py b/shapely/geometry/base.py
index c394e6413..e25279538 100644
--- a/shapely/geometry/base.py
+++ b/shapely/geometry/base.py
@@ -471,9 +471,6 @@ def buffer(
----------
distance : float
The distance to buffer around the object.
- resolution : int,... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new warning for the deprecated 'resolution' argument should be a DeprecationWarning (as done for the positional/keyword arguments) instead of FutureWarning, so downstream packages can see and silence it in CI before it reaches end users.", "category": "design", "verdict": "supported", "prior... | null |
shapely__shapely__2244 | shapely/shapely | 2,244 | defect | 659a7586a3f87d1034b1db33e629c4c348857174 | c3164cba7d2c5e083effa33e8de2a0871bd40200 | DEPR: remove BaseGeometry.almost_equals() | This removes `BaseGeometry.almost_equals()` as it has noted for a few years that it will be removed for shapely 2.1.
There are a few relevant xrefs:
- #1555 (ping @snowman2)
- #1604
- 26cafd027ab26a6b728ce8a3d26f0b9c8b114bf1
Is there anything further to consider? Or just remove it? (I have no string opinions... | diff --git a/shapely/geometry/base.py b/shapely/geometry/base.py
index 31a053ccf..073cb5a0b 100644
--- a/shapely/geometry/base.py
+++ b/shapely/geometry/base.py
@@ -873,46 +873,6 @@ def equals_exact(self, other, tolerance=0.0, *, normalize=False):
shapely.equals_exact(self, other, tolerance, normalize=norm... | 1 | 1 | 0 | [{"id": "G0", "claim": "Remove the replacement test test_almost_equals_removed that the PR added to shapely/tests/legacy/test_equality.py.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
shapely__shapely__2257 | shapely/shapely | 2,257 | defect | 474b2d7aa9d88c91984666809ed937f7c253f980 | 7e7c44771d7f6ca675fee8d0890237acf6f77e0e | DEPR: deprecate symmetric_difference_all | See https://github.com/shapely/shapely/issues/2027 for more context: the `symmetric_difference_all` has wrong behaviour which is not easy to fix, so rather deprecate and remove this function for now. | diff --git a/shapely/set_operations.py b/shapely/set_operations.py
index fe58a41f4..78cf360a7 100644
--- a/shapely/set_operations.py
+++ b/shapely/set_operations.py
@@ -1,5 +1,7 @@
"""Set-theoretic operations on geometry objects."""
+import warnings
+
import numpy as np
from shapely import Geometry, GeometryType... | 2 | 2 | 0 | [{"id": "G0", "claim": "The docstring deprecation note misspells 'incorrectlly' for 'incorrectly'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The deprecation warning message misspells 'incorrectlly' for 'incorrectly'.", "category": "documentat... | null |
shapely__shapely__2291 | shapely/shapely | 2,291 | defect | 88309764d16846be5108a0aa236757ad97b1ba9c | 7b9796d2a5e8252bcba6dbec9997946652d0e08c | BUG: avoid memory segfault in from_ragged_array | Fixes the issue reported in https://github.com/shapely/shapely/discussions/2284
We were allocating a too small temporary array for storing the intermediate rings.
| diff --git a/shapely/_geometry_helpers.pyx b/shapely/_geometry_helpers.pyx
index 69b9cbb9b..a23859940 100644
--- a/shapely/_geometry_helpers.pyx
+++ b/shapely/_geometry_helpers.pyx
@@ -454,7 +454,7 @@ def _from_ragged_array_multi_linear(
MultiLineString (geometry_type 5): linear_type is a LineString (1)
"""
... | 2 | 1 | 0 | [{"id": "G0", "claim": "The new test code should use NumPy's modern RNG API (np.random.default_rng) instead of the legacy np.random.randn.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The random test coordinates should be made reproducible by ... | null |
shapely__shapely__2306 | shapely/shapely | 2,306 | defect | 788b017879b18fa0e9ffe127f1697df6057592f4 | b9ed290b59f7f198d273ea3ecc3d63552dd7da61 | exploding singular, linear objects into constituent segments | This resolves #2188 | diff --git a/shapely/ops.py b/shapely/ops.py
index ff36f72ef..5c6374d65 100644
--- a/shapely/ops.py
+++ b/shapely/ops.py
@@ -1,7 +1,11 @@
"""Support for various GEOS geometry operations."""
+import numpy
+
import shapely
from shapely.algorithms.polylabel import polylabel # noqa
+from shapely.coordinates import ge... | 12 | 12 | 3 | [{"id": "G0", "claim": "The get_segments function should not live in ops.py, which exists for historic reasons, but alongside get_coordinates (reviewer later preferred _geometry.py next to get_parts), with the tests moved to a non-legacy file.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "... | null |
shapely__shapely__2313 | shapely/shapely | 2,313 | defect | 219f39f7ddef856b64c094d5a39066882dfcc697 | 0e0571656c60000d1c11afdd836f42486b15a7a5 | ENH: Add minimum_width function (minimum diameter) | Add support for GEOS Minimum Diameter/Width functionality
Closes #2312 | diff --git a/shapely/constructive.py b/shapely/constructive.py
index 5f0e90569..de53daf9a 100644
--- a/shapely/constructive.py
+++ b/shapely/constructive.py
@@ -32,6 +32,7 @@
"minimum_bounding_circle",
"minimum_clearance_line",
"minimum_rotated_rectangle",
+ "minimum_width",
"node",
"normali... | 4 | 4 | 0 | [{"id": "G0", "claim": "The docstring misdescribes the degenerate cases: it says the function may return the point itself for points and ignores that straight lines are also degenerate, while the tests show it always returns a (possibly zero-length) LineString.", "category": "documentation", "verdict": "supported", "pr... | null |
shapely__shapely__2318 | shapely/shapely | 2,318 | defect | a561132c4e13c1fde597f56a8a7133c3c09b9928 | bb2702a7145fc6edcda416b84f8bc711df42ba07 | TST: update test_coverage_union_overlapping_inputs for upstream GEOS change | Upstream GEOS recently changed so this now raises an error instead of silently returning the invalid input unchanged.
xref https://github.com/libgeos/geos/pull/1279#discussion_r2253380355 | diff --git a/shapely/set_operations.py b/shapely/set_operations.py
index 39692c6b3..167817c44 100644
--- a/shapely/set_operations.py
+++ b/shapely/set_operations.py
@@ -562,6 +562,9 @@ def coverage_union(a, b, **kwargs):
This is an optimized version of union which assumes the polygons to be
non-overlapping.... | 1 | 1 | 0 | [{"id": "G0", "claim": "The docstring note added to coverage_union has a typo — \"it may return the input unchanges\" should read \"unchanged\" — and dbaston's suggestion corrects it.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
shapely__shapely__2353 | shapely/shapely | 2,353 | defect | 5dc23fe7d6ede70f172f5e202e14188a19c7a6b6 | f89d0e0e02010d6d3af1ba566aba565839597b21 | perf: Improve performance of scalar Y -> Y functions | This extends the work started in https://github.com/shapely/shapely/pull/2339 for the geometry methods that return another geometry.
Please check the PR description there for a description of what happened here.
Additional changes
- Split out the geometry-array related functions into a new `geom_arr` source and ... | diff --git a/setup.py b/setup.py
index 2943268db..626f6a423 100644
--- a/setup.py
+++ b/setup.py
@@ -156,6 +156,7 @@ def version_tuple(ver):
sources=[
"src/c_api.c",
"src/coords.c",
+ "src/geom_arr.c",
"src/geos.c",
"src/lib... | 3 | 3 | 1 | [{"id": "G0", "claim": "The 'UTILITY FUNCTIONS' section banner added at the top of src/geos_funcs_Y_Y.c is leftover and should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "core_Y_Y_operation should use the centralized ShapelyGetGeo... | null |
shapely__shapely__2367 | shapely/shapely | 2,367 | defect | 9cca2e074cd9f695a99e3c884919eb18f99328d6 | 3b98bec32ee7620a3513026c7bd382a5498ef12c | TST: ignore 'invalid' runtime warnings on macOS for minimum_width/oriented_envelope | As noticed in https://github.com/shapely/shapely/pull/2364#issuecomment-3643775927
Related upstream issue: https://github.com/libgeos/geos/issues/1235 | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 636269b43..5de153f4a 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -56,10 +56,6 @@ jobs:
python: "pypy3.11"
geos: 3.12.3 # keep distinct from free threaded geos version
nu... | 2 | 1 | 1 | [{"id": "G0", "claim": "The new ignore_invalid guards on macOS should not restrict the suppression to only GEOS 3.13 and 3.15 but use a relaxed version check (>= 3.12) so the warnings are also silenced for other GEOS versions on that platform.", "category": "correctness", "verdict": "supported", "priority": "P1", "scop... | null |
shapely__shapely__422 | shapely/shapely | 422 | defect | 18ae7998c24d02b91f4fd62971cf4e69c8b340a2 | 0f647287885cfd81b76a8d963d2f20dc15f027dd | Add support for GeometryCollection to shape and asShape functions | Hello,
I added support for `GeometryCollection` to the `shape` and `asShape` functions. Hope it can help other people.
By the way, great package! Thank you!
_PS: I would very much appreciate if you could tag the issue with [hacktoberfest](https://hacktoberfest.digitalocean.com/)_ 😄
| diff --git a/shapely/geometry/geo.py b/shapely/geometry/geo.py
index 55d2d90f6..7e02edae0 100644
--- a/shapely/geometry/geo.py
+++ b/shapely/geometry/geo.py
@@ -8,6 +8,7 @@
from .multipoint import MultiPoint, asMultiPoint
from .multilinestring import MultiLineString, asMultiLineString
from .multipolygon import Multi... | 2 | 2 | 1 | [{"id": "G0", "claim": "Use a list comprehension instead of appending to an empty list in both shape() and asShape() for the geometrycollection branch.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a couple of tests asserting that all parts of ... | null |
shapely__shapely__573 | shapely/shapely | 573 | defect | 9fb5fe8fd6ca78648b25c16be8451e151748dd89 | 3376c47aae7f221a5f92413978fbe2344c28de65 | shape() method can parse empty geojson | In the current code, if you try to save and parse an empty polygon, the shape() method will result in an IndexError.
```python
from shapely.geometry import Polygon, shape, mapping
shape(mapping(Polygon()))
Traceback (most recent call last):
File "...", line 2910, in run_code
exec(code_obj, self.user_glo... | diff --git a/shapely/geometry/geo.py b/shapely/geometry/geo.py
index 96f301c8c..e465f3269 100644
--- a/shapely/geometry/geo.py
+++ b/shapely/geometry/geo.py
@@ -32,7 +32,10 @@ def shape(context):
elif geom_type == "linestring":
return LineString(ob["coordinates"])
elif geom_type == "polygon":
- ... | 2 | 2 | 1 | [{"id": "G0", "claim": "Instead of catching IndexError with try/except, shape() should avoid the IndexError altogether by checking whether ob[\"coordinates\"] is empty before constructing the Polygon.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The pu... | null |
shapely__shapely__583 | shapely/shapely | 583 | defect | bed28170140429d58e4079c57cc2480c5e5ff6ab | 22db3185290404590105a87def5aa1067c48cda5 | Added GEOSClipByRect / shapely.ops.clip_by_rect | TODO - write docstring.
@drnextgis - is there a good reference for this?
> This function from GEOS 3.5.0. Clips a geometry by a 2D box in a fast but possibly dirty way.
Closes #370. | diff --git a/shapely/ctypes_declarations.py b/shapely/ctypes_declarations.py
index 6312ede3f..17900a267 100644
--- a/shapely/ctypes_declarations.py
+++ b/shapely/ctypes_declarations.py
@@ -210,6 +210,10 @@ def prototype(lgeos, geos_version):
lgeos.GEOSGetCentroid.restype = c_void_p
lgeos.GEOSGetCentroid.argty... | 1 | 1 | 1 | [{"id": "G0", "claim": "The clip_by_rect function needs a docstring written to replace the TODO placeholder before merge.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
shapely__shapely__700 | shapely/shapely | 700 | defect | 5157665a883a273e76768968b7db3a1f1e1be16a | f59850295ea4459c88f70453194d8702db7d9f3f | #695: fix segfault and unicode errors for non text parameter wkt loads | fix for https://github.com/Toblerity/Shapely/issues/695 | diff --git a/shapely/geos.py b/shapely/geos.py
index 149a8981c..4e81d91f3 100644
--- a/shapely/geos.py
+++ b/shapely/geos.py
@@ -257,6 +257,8 @@ def __del__(self):
def read(self, text):
"""Returns geometry from WKT"""
+ if not isinstance(text, (bytes, str) if sys.version_info[0] >= 3 else (str, u... | 5 | 5 | 2 | [{"id": "G0", "claim": "The type check in read() should be simplified to intercept only the int case (ctypes' c_char_p interprets ints as pointers to memory), converting the AttributeError raised for other non-string types into a TypeError, instead of the broad isinstance(bytes/str) check.", "category": "design", "verd... | null |
shapely__shapely__786 | shapely/shapely | 786 | defect | b21a964a56a86cf77c67b477db7e7c2e81d2ccb5 | 80b2b83fc302197e5f54014ee77e2530cb44639a | Guard for empty geometries in affinity functions | `affine_transform` checks if empty but the functions in affinity will raise an Exception before reaching that check as noted in #763. This resolves #763 | diff --git a/shapely/affinity.py b/shapely/affinity.py
index 78e5c7e8d..1457874d5 100755
--- a/shapely/affinity.py
+++ b/shapely/affinity.py
@@ -151,6 +151,8 @@ def rotate(geom, angle, origin='center', use_radians=False):
xoff = x0 - x0 * cos(r) + y0 * sin(r)
yoff = y0 - x0 * sin(r) - y0 * cos(r)
... | 2 | 2 | 1 | [{"id": "G0", "claim": "The same `if geom.is_empty: return geom` block should also be added at the top of the affinity function at line 257 of affinity.py (translate), with a test for it.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new empty-... | null |
shapely__shapely__849 | shapely/shapely | 849 | defect | fdbc34ee375ebc08183e45a4d4c0c32bf7cea166 | a21868b45eb087a246171357c4cf26a6b72f4130 | Fix substring for complex geometries | Closes #848
This appears to work correctly with the example provided in #848

I haven't yet been able to come up with a simple test for this. I tried simple stuff like
```json
[0, 0], [2, 0], [0, 0]
... | diff --git a/shapely/ops.py b/shapely/ops.py
index eff851f62..7a1b96f39 100644
--- a/shapely/ops.py
+++ b/shapely/ops.py
@@ -498,39 +498,43 @@ def substring(geom, start_dist, end_dist, normalized=False):
"""
assert(isinstance(geom, LineString))
-
+
# Filter out cases in which to return a point
... | 2 | 2 | 1 | [{"id": "G0", "claim": "The pull request should add more test cases, in particular a test using the geometry data attached to issue #848, to demonstrate the fix and protect against regressions.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Instantiatin... | null |
shapely__shapely__852 | shapely/shapely | 852 | defect | 053df248e4663c8a0f800a4c03e80521a28e8f2e | 7363d5bf88fa981e8cc32b2d9193747d0a645107 | Handle for empty list/list of lists in 'coordinates' | Fixes https://github.com/Toblerity/Shapely/issues/837
Fixes https://github.com/Toblerity/Shapely/issues/840
Two questions:
- I wasn't sure about more tests, but I'm not opposed to adding a `test_shape.py`
- Does this logic also need to support `asShape`? It wasn't super clear to me how that should work. | diff --git a/shapely/geometry/geo.py b/shapely/geometry/geo.py
index ce2a602c4..670e58440 100644
--- a/shapely/geometry/geo.py
+++ b/shapely/geometry/geo.py
@@ -1,7 +1,7 @@
"""
Geometry factories based on the geo interface
"""
-
+import numpy as np
from .point import Point, asPoint
from .linestring import LineStri... | 3 | 1 | 1 | [{"id": "G0", "claim": "shapely/geometry/geo.py makes numpy a hard dependency (the module imports numpy unconditionally and the helper type-checks against np.ndarray), and since numpy is an optional dependency of shapely, support for arrays should be added in a way that does not import numpy here.", "category": "correc... | null |
shapely__shapely__881 | shapely/shapely | 881 | defect | 45aca1537da837a9abd0715aa0e285251d60b8ed | 3915c2265bf4c31a6d40fa3a43afd84883ece19a | Add GEOSVoronoiDiagram to shapely | Per #833.
I thought it made sense to keep Delauney / Voronoi close together in the code since they're similar in use and right next to each other in the CAPI, but if you disagree I'm happy to move it to wherever.
I couldn't nail down for sure exactly when VoronoiDiagram was added to the CAPI. [This](https://gith... | diff --git a/CREDITS.txt b/CREDITS.txt
index c4d0e51bd..ff72820e0 100644
--- a/CREDITS.txt
+++ b/CREDITS.txt
@@ -76,6 +76,7 @@ Shapely is written by:
* Taro Matsuzawa aka. btm <btm@tech.email.ne.jp>
* Thibault Deutsch <thibault.deutsch@gmail.com>
* Thomas Kluyver <takowl@gmail.com>
+* Tom Caruso <carusot42@gmail.com... | 6 | 5 | 1 | [{"id": "G0", "claim": "It may be worth raising an error that specifically calls out the tolerance failure behavior (GEOS returning null) rather than the generic error about creating geometry from null values.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim"... | null |
shapely__shapely__895 | shapely/shapely | 895 | defect | d3d1e3a2bf50bb6a06f766d9bd840348fbafb070 | b4292eb0dc51a0098175168f67e23e90b1a53be7 | Add implementation for make_valid | Closes #883. | diff --git a/CHANGES.txt b/CHANGES.txt
index ae113056f..39112a3a8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@ Changes
New features:
- shapely.ops.voronoi_diagram() computes the Voronoi Diagram of a geometry or geometry collection (#833, #851).
+- shapely.validation.make_valid() fixes invalid geometri... | 4 | 4 | 2 | [{"id": "G0", "claim": "A method appears to have gone away under GEOS 3.6: the merge-conflict resolution left the GEOSMinimumClearance ctypes declarations nested inside the GEOS > (3, 8, 0) block, so they are no longer declared for GEOS 3.6 and the GEOS 3.6 CI job fails.", "category": "correctness", "verdict": "support... | null |
shapely__shapely__898 | shapely/shapely | 898 | defect | a34ec59a7dc9089a71968c6871e29addd872ea3b | feac5598a08c666462533ccddc9968010265c592 | Raise an error on creation of MultiPoint or LineString with empty components | Closes #836.
As of Shapely 1.7, asking for the WKT of a MultiPoint or -LineString with an empty component results in a segfault. I figured it made more sense to error in that case and let the user take care of the issue - realistically I can't see much utility in having a MultiPoint or -LineString with an empty comp... | diff --git a/shapely/geometry/multilinestring.py b/shapely/geometry/multilinestring.py
index ca432dfdb..0614439cb 100644
--- a/shapely/geometry/multilinestring.py
+++ b/shapely/geometry/multilinestring.py
@@ -132,6 +132,10 @@ def geos_multilinestring_from_py(ob):
# add to coordinate sequence
for l in range(L)... | 3 | 3 | 1 | [{"id": "G0", "claim": "Raise a shapely-specific exception, such as a new shapely.errors.EmptyPartError, instead of the generic ValueError when creating a MultiLineString or MultiPoint with an empty component.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim"... | null |
shapely__shapely__900 | shapely/shapely | 900 | defect | de4838e102dcfd54aadc8af03ed33def918334e6 | ae406e5b5543c4c62b5654e6e189b4ef57bae4e2 | Deprecate mutability of Point, LineString, LinearRing geometries | xref https://github.com/Toblerity/Shapely/issues/782/ (Shapely 2.0).
Example of deprecating mutability this for Point:
- Raise a warning in the `coords` setter
- Splitted the tests to more easily isolate the parts that are deprecated (to now filter the warnings, and later to remove in Shapely 2.0)
- Added one t... | diff --git a/shapely/geometry/point.py b/shapely/geometry/point.py
index 3bc6fc18c..84f008a55 100644
--- a/shapely/geometry/point.py
+++ b/shapely/geometry/point.py
@@ -2,6 +2,7 @@
"""
from ctypes import c_double
+import warnings
from shapely.errors import DimensionError
from shapely.geos import lgeos
@@ -45,7 ... | 3 | 3 | 1 | [{"id": "G0", "claim": "The shapely20_deprecated pytest marker should be declared in a shared location (e.g. conftest.py) so it does not need to be re-declared in every test file that uses it.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The m... | null |
shapely__shapely__950 | shapely/shapely | 950 | defect | 24a9bf768315d7293bb31cc46d1f22a84cb8f7ea | c0ef04e84fddcaaf4604c415a7a00065b614a333 | Add deprecation warnings for iteration & getitem in multipart geometries | As per #932, this adds deprecation warnings for `__iter__` and `__getitem__` in multi-part geometries.
Looks like `stacklevel=1` gives a message like:
```
/Users/tom/dev/python/contrib/Shapely/shapely/geometry/base.py:880: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be ... | diff --git a/shapely/geometry/base.py b/shapely/geometry/base.py
index a5c85d7d8..4af4f998b 100644
--- a/shapely/geometry/base.py
+++ b/shapely/geometry/base.py
@@ -16,7 +16,7 @@
from shapely.affinity import affine_transform
from shapely.coords import CoordinateSequence
-from shapely.errors import WKBReadingError, ... | 5 | 5 | 2 | [{"id": "G0", "claim": "The new deprecation warnings should use stacklevel=2 as a minimum (absent other indirections) so the warning points at the code doing the iteration instead of at Shapely's own warn() line.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1",... | null |
shapesecurity__salvation__136 | shapesecurity/salvation | 136 | defect | c3e1e545be2884b25ffec9b497c426bd9f01c0de | 3d178254cb35cf9a024d17eed8a94d14c4c4463a | fixes GH-130 | - remove 'unsafe-inline' if hash or nonce is present in the same source list
- warn about disabled 'unsafe-inline' in a source list containing hash or source
- tests
| diff --git a/src/main/java/com/shapesecurity/salvation/Parser.java b/src/main/java/com/shapesecurity/salvation/Parser.java
index 53ed5b62..60fc7ddd 100644
--- a/src/main/java/com/shapesecurity/salvation/Parser.java
+++ b/src/main/java/com/shapesecurity/salvation/Parser.java
@@ -44,6 +44,8 @@ public class Parser {
... | 4 | 4 | 0 | [{"id": "G0", "claim": "The constant name unsafeInlineWarningMEssage should be spelled unsafeInlineWarningMessage.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer would rather the directive separately expose containsHashSource and co... | null |
shapesecurity__salvation__141 | shapesecurity/salvation | 141 | defect | 634482b877172c7ca0a4c7cffb351bf87d4faeb3 | 6039c476e71744c52781167e2f7dbf88d071f0ea | fixes #139 | - do not warn if base64 value matches either table 1 or table 2 grammar of RFC4648
- do not mention RFC4648 in warning messages
| diff --git a/src/main/java/com/shapesecurity/salvation/data/Base64Value.java b/src/main/java/com/shapesecurity/salvation/data/Base64Value.java
index 94fe42e2..ade6f97c 100644
--- a/src/main/java/com/shapesecurity/salvation/data/Base64Value.java
+++ b/src/main/java/com/shapesecurity/salvation/data/Base64Value.java
@@ -2... | 3 | 3 | 2 | [{"id": "G0", "claim": "Please add a test showing that the nonce value decodes properly.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The pull request should continue to warn when a value contains both one of '/' or '+' and one of '-' or '_', since th... | null |
shapesecurity__salvation__142 | shapesecurity/salvation | 142 | defect | faa3d30156b6f1d00e9eb486970145099e76b951 | e03ca53f8482524bbd943e99097b7799c612df6f | fixes GH-138 | add a policy method to do a post-process optimisation
| diff --git a/src/main/java/com/shapesecurity/salvation/Constants.java b/src/main/java/com/shapesecurity/salvation/Constants.java
index 36df4164..ccd6c266 100644
--- a/src/main/java/com/shapesecurity/salvation/Constants.java
+++ b/src/main/java/com/shapesecurity/salvation/Constants.java
@@ -30,5 +30,6 @@
+ ... | 2 | 2 | 1 | [{"id": "G0", "claim": "The fetch-directive flag should be overridden in subclasses rather than taken as a constructor parameter.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "`isFetchDirecive` is a typo, and the flag is not needed at all if the code us... | null |
shapesecurity__salvation__177 | shapesecurity/salvation | 177 | defect | d27819020dcbf73c55b9dd8ca5bf55841edfd662 | 9ac9667f0069210085fe29c92544c55778cc4cd3 | GH-147: Support worker-src and frame-src | `worker-src` defaults to `script-src`, `frame-src` defaults to deprecated `child-src`.
fixes GH-147.
| diff --git a/src/main/java/com/shapesecurity/salvation/Parser.java b/src/main/java/com/shapesecurity/salvation/Parser.java
index 16a18c89..43307ced 100644
--- a/src/main/java/com/shapesecurity/salvation/Parser.java
+++ b/src/main/java/com/shapesecurity/salvation/Parser.java
@@ -214,6 +214,8 @@ private boolean eat(@Nonn... | 1 | 1 | 0 | [{"id": "G0", "claim": "The fetch-directive registration in register() should be an `else if` on the nested-context branch instead of a second independent `if`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
shapesecurity__salvation__182 | shapesecurity/salvation | 182 | defect | d26e1cf2e07e4e328443ab4fc852fe6fef9fb894 | c0fff674f4288d70f1aa727d2d9521d7b199cdb0 | Warn about asterisk being used in media type. | fixes #181 | diff --git a/src/main/java/com/shapesecurity/salvation/Constants.java b/src/main/java/com/shapesecurity/salvation/Constants.java
index a710be3c..52bf88c4 100644
--- a/src/main/java/com/shapesecurity/salvation/Constants.java
+++ b/src/main/java/com/shapesecurity/salvation/Constants.java
@@ -14,7 +14,8 @@
+ ... | 4 | 4 | 0 | [{"id": "G0", "claim": "Drop the commented-out old mediaTypePattern line left in Constants.java.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The warning message has a grammar error (\"Make sure it not an attempt to match any\") and should tel... | null |
shapesecurity__salvation__184 | shapesecurity/salvation | 184 | defect | 3b8193c0994748beee108074ce9c616a9ec15023 | 0e2706aa51a8d688eec9df2a22c748f89c903f25 | Support 'report-sample' keyword-source | fixes #183 | diff --git a/src/main/java/com/shapesecurity/salvation/Parser.java b/src/main/java/com/shapesecurity/salvation/Parser.java
index b382a119..cce27e3a 100644
--- a/src/main/java/com/shapesecurity/salvation/Parser.java
+++ b/src/main/java/com/shapesecurity/salvation/Parser.java
@@ -52,7 +52,7 @@ public class Parser {
... | 4 | 3 | 0 | [{"id": "G0", "claim": "The style-src test case produces two notices and asserts on the one unrelated to report-sample; fix the nonce and assert on the remaining notice.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "A source list containing 'report-sam... | null |
shapesecurity__salvation__216 | shapesecurity/salvation | 216 | defect | fdc4f7b46674111c473bf97e38565f237d6c7c04 | 1a0158a086ef69d68b748b462613550fad25b229 | Introduce new directives | - script-src-elem, script-src-attr
- style-src-elem, style-src-attr
Adopt renaming 'unsafe-hashed-attributes' to 'unsafe-hashes'
fixes https://github.com/shapesecurity/salvation/issues/208
fixes https://github.com/shapesecurity/salvation/issues/207
fixes various bugs around optimisation and union merging | diff --git a/src/main/java/com/shapesecurity/salvation/Constants.java b/src/main/java/com/shapesecurity/salvation/Constants.java
index c99e35f5..019f75ce 100644
--- a/src/main/java/com/shapesecurity/salvation/Constants.java
+++ b/src/main/java/com/shapesecurity/salvation/Constants.java
@@ -17,7 +17,7 @@ public class Co... | 12 | 12 | 6 | [{"id": "G0", "claim": "Remove 'unsafe-hashed-attributes' from the unquoted keyword pattern in Constants.java (the keyword was renamed to 'unsafe-hashes', and the PR added the old name to the pattern).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "... | null |
shapesecurity__salvation__88 | shapesecurity/salvation | 88 | defect | aac33cc031fd32b5b744e255ac2b82e4afe293c4 | 796216ead9483921220c2a82b3b4d69fb4c2c648 | fixes GH-87 : Add query API for child-src and frame-src | Although I think spec should be be clear on what to do if both child-src and frame-src exist. FF doesn't implement child-src yet, so technically it is not CSP 2.0 compliant, as caniuse says.
| diff --git a/src/main/java/com/shapesecurity/salvation/data/Policy.java b/src/main/java/com/shapesecurity/salvation/data/Policy.java
index c4dc44e2..bb45ab26 100644
--- a/src/main/java/com/shapesecurity/salvation/data/Policy.java
+++ b/src/main/java/com/shapesecurity/salvation/data/Policy.java
@@ -510,4 +510,24 @@ publ... | 2 | 2 | 1 | [{"id": "G0", "claim": "The spec-quoting comment inside allowsFrameFromSource is unnecessary because the other directives that fall back to default sources do not quote the spec, so it should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "cla... | null |
shapesecurity__salvation__92 | shapesecurity/salvation | 92 | defect | d8ba75f2e0bce517439ab38f335f0c80701d9454 | 2b1d3a051674feb01c155eb6ffe7a749f92bbad0 | fixes #90 | verbose error in tokeniser for bad characters in directive-value
| diff --git a/src/main/java/com/shapesecurity/salvation/Tokeniser.java b/src/main/java/com/shapesecurity/salvation/Tokeniser.java
index 6677f608..94ab2b9a 100644
--- a/src/main/java/com/shapesecurity/salvation/Tokeniser.java
+++ b/src/main/java/com/shapesecurity/salvation/Tokeniser.java
@@ -5,7 +5,9 @@
import javax.a... | 4 | 3 | 0 | [{"id": "G0", "claim": "The newly added imports StandardCharsets and Arrays appear to be unused and should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new error path calls this.next() twice and the reviewer would prefer it be ... | null |
shapesecurity__shift-java__154 | shapesecurity/shift-java | 154 | defect | bcfc2ff3057323a18fd129c928f61bc090312fdd | 9acb032b0a199f00d0dca1b77abf47e023f8e2e3 | Add tests from test262-parser-tests | A number of these are xfailed currently; I'll have separate PRs fixing them once this lands. | diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 00000000..65d7d9d8
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,6 @@
+[submodule "src/test/resources/test262-parser-tests"]
+ path = src/test/resources/test262-parser-tests
+ url = https://github.com/tc39/test262-parser-tests.git
+[submodule "src/test/reso... | 3 | 3 | 0 | [{"id": "G0", "claim": "The Script/Module codeGen overloads in CodeGen (and the corresponding overloads taking a pretty parameter in PrettyCodeGen) should be removed and their calls replaced with the implementation of the Program overload.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "intr... | null |
shapesecurity__shift-java__229 | shapesecurity/shift-java | 229 | defect | 4bbb06180809952138139a4d0f0a98c11d1ad901 | b679a99c62cf2a99f18fa5360f0fbacc74aa7c17 | remove WebSafeTokenStream | Instead, have the WebSafeCodeGen always output "/script/" as " /script/". Also fixes a bug where `a</SCRIPT/` was not properly broken up.
This class was not public, so its removal should not be breaking. | diff --git a/pom.xml b/pom.xml
index f0dc3598..3d1fde52 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
<groupId>com.shapesecurity.shift</groupId>
<artifactId>es2017</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <version>1.0.3-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Shift AST</name>
diff... | 3 | 2 | 1 | [{"id": "G0", "claim": "The regexp escaping check and output construction should test `safened` and guarantee that `safe` never alters the trailing `/` of the literal.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a test where the regexp contai... | null |
shapesecurity__shift-java__42 | shapesecurity/shift-java | 42 | defect | e300774a6fa4ec228a5fe142872336405b7b3b4b | 236a291fe25a06e74fda6a2c2774cda62173f049 | Functional: add toArray | We shall let the user of `MonoidalReducer` to decide if the state is linear typed. Mutability should not get in people's way if it is not helping.
| diff --git a/src/main/java/com/shapesecurity/functional/data/ConcatList.java b/src/main/java/com/shapesecurity/functional/data/ConcatList.java
index bec5cd7f..5ce878bf 100644
--- a/src/main/java/com/shapesecurity/functional/data/ConcatList.java
+++ b/src/main/java/com/shapesecurity/functional/data/ConcatList.java
@@ -1... | 2 | 2 | 2 | [{"id": "G0", "claim": "Caching and handing out the shared Monoid.identity is wrong because the identity is an element, not a function; if it is to be mutated it should be cloned instead of shared.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "unclear"}, {"id": "G1", "claim": "Passing an a... | null |
shardeum__shardeum__151 | shardeum/shardeum | 151 | defect | 89db23e1d4ffb86b4353b8f37fb360ea3cd93c5b | 59497b48e0a0893a75e2bf056ad0cc8bc2c1d642 | GOLD-211: ECDSA Multi-sig feature | Task: https://linear.app/shm/issue/GOLD-211/
- Adding and unifying multi-sig related flags.
- Implement the new verifyMultiSigs which shardus core accepts.
- Bug fixes | diff --git a/src/config/index.ts b/src/config/index.ts
index 17ad8a4c..3b30af39 100644
--- a/src/config/index.ts
+++ b/src/config/index.ts
@@ -3,7 +3,7 @@ import path from 'path'
import merge from 'deepmerge'
import { ShardeumFlags } from '../shardeum/shardeumFlags'
import { DevSecurityLevel } from '@shardus/core'
-... | 1 | 1 | 0 | [{"id": "G0", "claim": "The comment inside verifyMultiSigs reads 'The sig has already been seen' but should read that the sig has not already been seen, since the code checks !seen.has(sigs[i].owner).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
shardeum__shardeum__448 | shardeum/shardeum | 448 | defect | 0b64ad237cf775972819e3cd19d4731e671d8c8d | d869cc4c29d356760e25070def50b3a5a1937da5 | SHARD-2225: Fix issue with replacing keys in config | ### **PR Type**
enhancement, bug fix
___
### **Description**
- Implement custom merge logic for configuration files.
- Introduce `mergeWithOverwrite` function for key-specific merging.
- Replace default merge with custom logic in configuration loading.
- Add support for overwriting specific keys in config.
___
... | diff --git a/src/config/customMerge.ts b/src/config/customMerge.ts
new file mode 100644
index 00000000..e0b597ca
--- /dev/null
+++ b/src/config/customMerge.ts
@@ -0,0 +1,51 @@
+import merge, { Options } from 'deepmerge'
+
+const overwriteMerge = (target: any[], source: any[]): any[] => source
+
+const shouldOverwrite =... | 3 | 1 | 0 | [{"id": "G0", "claim": "mergeWithOverwrite should check that both target and source are objects before proceeding with the merge, to prevent unexpected behavior or errors.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "keysToOverwrite should be vali... | null |
shardeum__shardeum__566 | shardeum/shardeum | 566 | defect | f607ab5514ec0073a141b25c53c084da51ce2e37 | 3e1609adbd6c8066b8628108b28e351b7457aea0 | Enhance initRewardTimes validation | ### Issue
Node start times are stored in SECONDS, but validation compares them against MILLISECONDS:
Where node start time is set (in seconds):
* In core [/src/p2p/CycleCreator.ts:745](https://github.com/shardeum/core/blob/dev/src/p2p/CycleCreator.ts#L745), cycle start time uses utils.getTime(‘s’) which returns seco... | diff --git a/src/tx/initRewardTimes.ts b/src/tx/initRewardTimes.ts
index b477d310..50437543 100644
--- a/src/tx/initRewardTimes.ts
+++ b/src/tx/initRewardTimes.ts
@@ -87,7 +87,9 @@ export function validateFields(tx: InitRewardTimes, shardus: Shardus): { success
/* prettier-ignore */ nestedCountersInstance.countEve... | 2 | 1 | 1 | [{"id": "G0", "claim": "The validation multiplies tx.nodeActivatedTime by 1000 assuming it is in seconds; if the value is already in milliseconds the conversion is wrong and could cause valid transactions to be rejected, so a check should determine whether nodeActivatedTime is in seconds or milliseconds before converti... | null |
shardeum__shardeum__582 | shardeum/shardeum | 582 | defect | f33bf352cf92ac0a17e6e58b5de9670f4442feb3 | 31cd8ebbd365c3914f34c5c50b7889c8f643d240 | Shard 2630 | ### **PR Type**
Bug fix, Enhancement
___
### **Description**
- Enforced strict schema validation for node reward transactions
- Added type checks to prevent transaction confusion (nodeReward vs nodeInitReward)
- Capped maximum reward duration to prevent exploitation
- Improved temporal validation for node activat... | diff --git a/src/index.ts b/src/index.ts
index 0d4f3417..572283a0 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -2509,6 +2509,18 @@ const configShardusNetworkTransactions = (): void => {
/* prettier-ignore */ if (ShardeumFlags.VerboseLogs) console.log('Invalid signature for internal tx', Utils.safeStringify(... | 2 | 2 | 2 | [{"id": "G0", "claim": "The new check for txData.endTime in validateClaimRewardTx only verifies its presence, not its type or validity, so endTime should be ensured to be a number and not NaN or an invalid value to prevent type confusion or malicious input.", "category": "security", "verdict": "supported", "priority": ... | null |
share__sharedb__261 | share/sharedb | 261 | defect | 88bb142d0a8ff1ac3d195c13a9148135c63d90e9 | 41c40f6416dc379f57bc8fa13557ee931e3fa033 | fix leak on duplicate subscription - #260 | When we subscribe to the same stream sharedb leak, because of the cross reference between the stream and the agent the leak is even more critical.
close #260 | diff --git a/lib/agent.js b/lib/agent.js
index 0bd0b496a..12d6f3cf5 100644
--- a/lib/agent.js
+++ b/lib/agent.js
@@ -105,7 +105,7 @@ Agent.prototype._subscribeToStream = function(collection, id, stream) {
stream.on('end', function() {
// The op stream is done sending, so release its reference
var streams =... | 2 | 1 | 1 | [{"id": "G0", "claim": "A test should cover this leak-fix case as well; there are currently no direct tests for the agent, though connection tests might cover it.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The same potential leak should also be fixe... | null |
share__sharedb__426 | share/sharedb | 426 | defect | 30badb22192eb04e43f983772058fb129598de51 | a3a14ecf5ae41263eb1d74b541bf07013146c29f | Optionally send `source` to the server | This change adds the capability to send an op's `source` to the server,
for access in middleware.
# Motivation
The use-case that inspired this change was the ability to record some
usage stats based on users' ops. It's possible to record these stats
through separate HTTP calls, but recording stats through Shar... | diff --git a/README.md b/README.md
index 44c31bffa..93e223707 100644
--- a/README.md
+++ b/README.md
@@ -412,6 +412,9 @@ Prevents own ops being submitted to the server. If subscribed, remote ops will s
`doc.resume()`
Resume sending own ops to the server if paused. Will flush the queued ops when called.
+`doc.submit... | 3 | 2 | 0 | [{"id": "G0", "claim": "The `submitSource` flag could read more clearly, with suggested alternatives such as `recordSource`, `trackOpSource`, `shouldSubmitSource` or `sourceIsSubmitted`.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "A test shou... | null |
share__sharedb__429 | share/sharedb | 429 | defect | 0986b1bff5f2fb557f33c5e584ef2a68f206c255 | 3b504508dcd753aee3196b8aa89042502e08cc52 | Add hook for end of op lifecycle | This change adds a new `after submit` event at the end of an op
submission, *regardless of success*.
At the moment, we have:
- `submit`: called when an op is submitted
- `afterWrite`: called after an op is successfully committed to the
database
- `reply`: called when the `Agent` is about to send a non-e... | diff --git a/lib/backend.js b/lib/backend.js
index 923dc33b3..8bcc1cad3 100644
--- a/lib/backend.js
+++ b/lib/backend.js
@@ -204,11 +204,17 @@ Backend.prototype.trigger = function(action, agent, request, callback) {
// Submit an operation on the named collection/docname. op should contain a
// {op:}, {create:} or {de... | 2 | 2 | 0 | [{"id": "G0", "claim": "The event name 'after submit' is a bad, misleading name and the event should be renamed (the reviewer suggests an '-ing' suffix such as 'submit finalizing' to convey it fires while the submit is still finishing).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope":... | null |
share__sharedb__434 | share/sharedb | 434 | defect | 10b83725a95493fadab09515a4fa88d2b17b89cd | abb6f9c25d70ea56511fbd3189ae5f91dc07ef9a | Ponyfill `nextTick` | Fixes https://github.com/share/sharedb/issues/255 & https://github.com/share/sharedb/issues/427
At the moment, ShareDB uses the Node.js `process.nextTick` everywhere,
including in client-side code.
ShareDB's current advice is to use a modern build-chain tool, such as
Webpack or Browserify to add support for the... | diff --git a/.eslintrc.js b/.eslintrc.js
index ab65eaee8..39efe7946 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -28,6 +28,8 @@ const SHAREDB_RULES = {
'no-unused-vars': ['error', {vars: 'all', args: 'after-used'}],
// It's more readable to ensure we only have one statement per line
'max-statements-per-line... | 1 | 1 | 1 | [{"id": "G0", "claim": "Add a simple test case confirming that when `process.nextTick` is present it is not replaced (still equals the original), and that when it is absent `util.nextTick` is defined and is a function; though the reviewer is unsure how easy stubbing will be.", "category": "testing", "verdict": "support... | null |
share__sharedb__446 | share/sharedb | 446 | defect | 0abab79e800b45fe0e0d1873057da4fb468f2d73 | 8a6e64e3317c07a32f2b31d232c1e9478d939f8e | Add the custom values on the agent onto the snapshot options when getSnapshot is called | It turns out that the `sharedb-mongo` [beforeSnapshotLookup](https://github.com/share/sharedb-mongo/blob/534143c110777304669b52f3920a5aec98e0c5d2/src/middleware/actions.js#L8) middleware is pretty useless, because there is no `sharedb` middleware that is triggered right before `getSnapshot` is called. We only have `rea... | diff --git a/lib/backend.js b/lib/backend.js
index 46f7b8325..95a1c5388 100644
--- a/lib/backend.js
+++ b/lib/backend.js
@@ -391,7 +391,8 @@ Backend.prototype.fetch = function(agent, index, id, options, callback) {
collection: collection,
id: id
};
- var snapshotOptions = options && options.snapshotOption... | 8 | 4 | 0 | [{"id": "G0", "claim": "The new expression in Backend.prototype.fetch should parenthesise `(options && options.snapshotOptions)` before `|| {}` for clarity.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The comment about sending the result to t... | null |
share__sharedb__488 | share/sharedb | 488 | defect | e34268323d9d53b0f3fee558481ce8d6ba9ce3e8 | 5a2457ef9af1150ac42151de17c055ab38536078 | Fixing Custom Agent Context Missing From getOps/getOpsBulk | This is required for downstream middleware.
Tests done and passing. | diff --git a/lib/backend.js b/lib/backend.js
index be74fd99e..58d821d1a 100644
--- a/lib/backend.js
+++ b/lib/backend.js
@@ -304,6 +304,8 @@ Backend.prototype._getSnapshotsFromMap = function(ids, snapshotMap) {
Backend.prototype._getSanitizedOps = function(agent, projection, collection, id, from, to, opsOptions, cal... | 1 | 1 | 1 | [{"id": "G0", "claim": "The pull request should include tests for the new agentCustom-passing behaviour in getOps/getOpsBulk before being approved.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
share__sharedb__496 | share/sharedb | 496 | defect | e982eb623f932a962f560e52da438de2e60c9174 | 53a223882a5d2010459b291b4c67cd10e974c503 | 🥅 Allow fetching historic snapshots with bad `json0` paths | `json0` recently merged a [breaking change][1] which enforces some
stricter type checking.
Apart from this stricter type checking, no other changes were made, so
any client that only ever submits well-formed ops should be able to
upgrade directly without any trouble.
However, if clients submitted some bad ops ... | diff --git a/lib/backend.js b/lib/backend.js
index 58d821d1a..895b2d497 100644
--- a/lib/backend.js
+++ b/lib/backend.js
@@ -836,7 +836,7 @@ Backend.prototype._fetchSnapshotByTimestamp = function(collection, id, timestamp
Backend.prototype._buildSnapshotFromOps = function(id, startingSnapshot, ops, callback) {
va... | 2 | 2 | 0 | [{"id": "G0", "claim": "The `json0op` parameter should be renamed to `json0Op` for correct lowerCamelCase.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The local `ops` variable should be renamed to `opComponents` or `components` to distinguish... | null |
share__sharedb__508 | share/sharedb | 508 | defect | 8263263e8de5d5ee5572782aac51f8fd434e03ca | e6312f24cf217ac54fe4f6a08efa04c4a3d5e597 | Add Doc.toSnapshot | Fix #500 | diff --git a/lib/client/doc.js b/lib/client/doc.js
index e37023b2c..6c709ce9f 100644
--- a/lib/client/doc.js
+++ b/lib/client/doc.js
@@ -919,6 +919,17 @@ Doc.prototype.resume = function() {
this.flush();
};
+// Create a snapshot that can be serialized, deserialized, and passed into `Doc.ingestSnapshot`.
+//
+// N... | 5 | 5 | 2 | [{"id": "G0", "claim": "The snapshot returned by the new method omits `type`, and the reviewer questions the logic for omitting it — the snapshot then relies on ingestSnapshot's defaultType fallback instead of carrying the document's own type.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "... | null |
share__sharedb__524 | share/sharedb | 524 | defect | 07f8bd98e5cdae37e925d4c0c709a1c3cbbca5e0 | 4c4b2360cfe1e43407df5befc433d9bce9bad98d | 🔒 Prevent sending `sendPresence` middleware errors to subscribers | At the moment, if an error is passed in the `sendPresence` middleware,
this error is broadcast to any subscribed listeners.
Consumers may wish to use the `sendPresence` middleware to filter
messages being sent to particular clients (eg based on authentication or
other criteria). In these cases, no information at ... | diff --git a/lib/agent.js b/lib/agent.js
index 8f8022655..4b596665e 100644
--- a/lib/agent.js
+++ b/lib/agent.js
@@ -815,7 +815,9 @@ Agent.prototype._handlePresenceData = function(presence) {
var agent = this;
backend.trigger(backend.MIDDLEWARE_ACTIONS.sendPresence, this, context, function(error) {
if (error... | 4 | 2 | 1 | [{"id": "G0", "claim": "Rename the `sendPresenceMiddlewareServerErrors` flag to something like `dontForwardSendPresenceErrorToClient`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Replace the flag-based handling with a new non-fatal error hand... | null |
share__sharedb__528 | share/sharedb | 528 | defect | a1a33852531432baeb3cb948ca36500bdbc60fa4 | 130499c45f2e7ef116dc77966f2927a617d4d05e | 🐛 Prevent local presence transformation when presence created late | This change fixes a presence edge case:
1. Register a `doc.on('op')` listener which submits presence
2. Create the `LocalPresence` _after_ registering this listener
3. Submit an op
4. The presence being submitted is transformed against the submitted op
when it shouldn't be
This happens because the `Lo... | diff --git a/lib/client/doc.js b/lib/client/doc.js
index ec4919206..d8df639d9 100644
--- a/lib/client/doc.js
+++ b/lib/client/doc.js
@@ -114,6 +114,10 @@ function Doc(connection, collection, id) {
// ops are still received. Should be toggled through the pause() and
// resume() methods to correctly flush on resume... | 2 | 2 | 0 | [{"id": "G0", "claim": "The nested-ternary data initialization in _otApply should be rewritten as if/else statements for readability.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "A brief comment should be added explaining what case the data-ve... | null |
share__sharedb__535 | share/sharedb | 535 | defect | aa720e993c13cdab8adaf6e6ac87d3ac9beee4cf | 85f6ecb3d76d8db33dc2916a723d7719c84fb4da | 🐛 Fix issue with null timestamp in fetchSnapshotByTimestamp | When calling
```
backend.fetchSnapshotByTimestamp('books', 'mocking-bird', null, next)
```
shareDb was loading the latest milestone snapshot and was not applying
the ops that happen after the milestone. | diff --git a/lib/backend.js b/lib/backend.js
index 017d49de2..ad8dc3a51 100644
--- a/lib/backend.js
+++ b/lib/backend.js
@@ -810,6 +810,7 @@ Backend.prototype.fetchSnapshotByTimestamp = function(agent, index, id, timestam
id: id,
timestamp: timestamp
};
+ timestamp = timestamp ? timestamp : Date.now();
... | 3 | 3 | 1 | [{"id": "G0", "claim": "A decision is needed on whether the timestamp in the middleware request should be null or Date.now() when the client is asking for the most recent snapshot.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The added truthy check `ti... | null |
share__sharedb__540 | share/sharedb | 540 | defect | 8ede8c01d9111b08f68c7782083e0501b6509a3a | 4968ff8dd1295a43ac81d05c5db7ccca9c5ce2b6 | remote ops are transformed by ops submitted in `before op` event handler | as discussed in https://github.com/share/sharedb/issues/474#issuecomment-1020742910 and https://github.com/share/sharedb/issues/474#issuecomment-1021021414, remote ops should be transformed by ops submitted in `before op` event handler. | diff --git a/lib/client/doc.js b/lib/client/doc.js
index c016b9c82..3667b4895 100644
--- a/lib/client/doc.js
+++ b/lib/client/doc.js
@@ -624,6 +624,8 @@ Doc.prototype._otApply = function(op, source) {
for (var i = 0; i < op.op.length; i++) {
var component = op.op[i];
var componentOp = {op: [com... | 3 | 3 | 0 | [{"id": "G0", "claim": "Remove the commented-out console.log line in the `before op` handler.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Make the handler logic more readable by dropping the counter — replace both handlers ('before op' here a... | null |
share__sharedb__576 | share/sharedb | 576 | defect | 8b531bedf19860ffe0b37a3e1c8da7a32b5005bd | 5cb2dc584001e6667d4214fd15ccacc5158c5b47 | ✨ Add ping/pong | This change adds the ability for a client to send a "ping" to the server
and receive a "pong" response.
The motivation for this is that sometimes the socket underlying the
`Connection` may not reliably report its connection state (for example
if using a wrapper around a "vanilla" websocket that handles
reconnect... | diff --git a/lib/agent.js b/lib/agent.js
index ce2e43a46..2ad4d383d 100644
--- a/lib/agent.js
+++ b/lib/agent.js
@@ -447,6 +447,8 @@ Agent.prototype._handleMessage = function(request, callback) {
return this._subscribePresence(request.ch, request.seq, callback);
case ACTIONS.presenceUnsubscribe:
... | 1 | 1 | 1 | [{"id": "G0", "claim": "Throw an error from Connection.prototype.ping when the connection state is not connected, to guard against ping requests queueing up at the socket layer while disconnected or connecting and flooding the socket once it eventually connects.", "category": "correctness", "verdict": "supported", "pri... | null |
share__sharedb__579 | share/sharedb | 579 | defect | 5176283e2d1c9dc263f1fa3c2bc6a93c1afe2ad3 | 71b02a403a5a11406bf43bcaef63f581517fba58 | 🐛 Allow getting `Presence` while it's being destroyed | There's currently an edge case involving trying to get presence in the middle of being destroyed. For example, consider these synchronous calls:
```js
var presence = connection.getPresence('channel')
presence.destroy()
var newPresence = connection.getPresence('channel')
```
Since `Presence` objects are per-ch... | diff --git a/lib/client/connection.js b/lib/client/connection.js
index ce5766ccf..97125a16c 100644
--- a/lib/client/connection.js
+++ b/lib/client/connection.js
@@ -773,17 +773,21 @@ Connection.prototype._initialize = function(message) {
Connection.prototype.getPresence = function(channel) {
var connection = this... | 1 | 1 | 0 | [{"id": "G0", "claim": "A comment should be added to explain why `localIds` is gotten synchronously at the top of `destroy()` whereas `remoteIds` is gotten inside the callback.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
share__sharedb__588 | share/sharedb | 588 | defect | cc0e3382bf3df4c38c7ccc6bc52da71aff8c9f74 | fd2fb897b04ba6b41cfef2e302db9957e3e54e57 | 🔇 Fix sensitive memory leak warnings when using presence | Fixes https://github.com/share/sharedb/issues/584
At the moment, we [attach `Doc` listeners][1] for every remote client in a document (as well as every local user).
This means `Doc`s can quickly hit the [default of 10][2] maximum event listeners.
This change adds a `DocPresenceEmitter` class, which only regist... | diff --git a/lib/client/connection.js b/lib/client/connection.js
index 4655c39a7..0c3ad28f1 100644
--- a/lib/client/connection.js
+++ b/lib/client/connection.js
@@ -10,6 +10,7 @@ var ACTIONS = require('../message-actions').ACTIONS;
var types = require('../types');
var util = require('../util');
var logger = require(... | 1 | 1 | 0 | [{"id": "G0", "claim": "The event forwarder would be more readable using `emitter.emit.bind(emitter, event)` instead of unshifting the event onto the arguments and calling `emitter.emit.apply`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
share__sharedb__626 | share/sharedb | 626 | defect | 62e4ec5d46c0dcb097931e9dae60240aaba6b2b3 | 5a3bbfda23affa2645908fbbbc2dc41e4f8162f2 | ♻ Throw error for pending ops on hard rollback | Our current flow for handling the rollback swallows some errors and discards pending ops.
1. Whenever we do hard rollback and fetch for hard rollback fails we should throw the error so that user is informed that something really wrong happen.
2. Whenever we preform the hard rollback and we have some pending ops and t... | diff --git a/lib/client/doc.js b/lib/client/doc.js
index 2472839e7..e9d784f7a 100644
--- a/lib/client/doc.js
+++ b/lib/client/doc.js
@@ -329,10 +329,6 @@ Doc.prototype._handleSubscribe = function(error, snapshot) {
Doc.prototype._handleOp = function(err, message) {
if (err) {
if (this.inflightOp) {
- // T... | 12 | 11 | 4 | [{"id": "G0", "claim": "The pendingOps slice is unnecessary because this.pendingOps is reset to [] shortly after, so it should just be assigned directly.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Logging the whole doc is not nice and can ev... | null |
share__sharedb__649 | share/sharedb | 649 | defect | 8ba28c5b6d525cca5d73c6fe5e7904b2c9a9b2de | b9a8accd2f2c0e6578531a299cd4e19b9445a43c | ♻️ Check `nextTick` polyfill once at module level | At the moment we check for the presence of `process` every time we call `nextTick()`.
This change checks just once at the module level instead. | diff --git a/lib/util.js b/lib/util.js
index 2ddc62e63..e3a50a381 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -85,31 +85,36 @@ exports.truthy = function(arg) {
return !!arg;
};
-exports.nextTick = function(callback) {
- if (typeof process !== 'undefined' && process.nextTick) {
- return process.nextTick.appl... | 2 | 2 | 2 | [{"id": "G0", "claim": "At module level, `exports.nextTick = process.nextTick.apply(null, arguments)` invokes nextTick immediately at load time with `arguments` undefined instead of assigning the function, so the module should just assign `exports.nextTick = process.nextTick;`.", "category": "correctness", "verdict": "... | null |
share__sharedb__651 | share/sharedb | 651 | defect | a5c19b986d65c93abbc9ed11f7a25c0dbaf0788c | 8a52f108227fe9a768b080a7665d3d6b8689b05c | 🐛 Avoid mutating milestone snapshots when building from ops | At the moment, we directly pass our milestone snapshot to `ot.applyOps()`, which [mutates the snapshot][1].
In most Production-grade implementations of the `MilestoneDb`, this is fine, since mutating the in-memory `Snapshot` will have no effect on the underlying database representation.
However, this does break t... | diff --git a/lib/backend.js b/lib/backend.js
index c69693a56..7a3cd41cc 100644
--- a/lib/backend.js
+++ b/lib/backend.js
@@ -909,7 +909,7 @@ Backend.prototype._fetchSnapshotByTimestamp = function(collection, id, timestamp
};
Backend.prototype._buildSnapshotFromOps = function(id, startingSnapshot, ops, callback) {
-... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add a comment to the new test case explaining that it verifies the client-facing connection.fetchSnapshot does not in-place mutate the stored milestone snapshot returned by the internal milestoneDb.getMilestoneSnapshot.", "category": "documentation", "verdict": "supported", "priority": "P2", "sc... | null |
share__sharedb__659 | share/sharedb | 659 | defect | 22e554d6eff3c46787d6ceac3b54e091774a8498 | 9f089775ff172dd2898fe42d10254ddaa21737ed | 🗃 Add `_create` metadata to snapshots to avoid `getCommittedOpVersion()` | Supersedes https://github.com/share/sharedb/pull/657
The `DB.getCommitedOpVersion()` function is only used [in one place][1]: in a corner case that differentiates between two "blind", versionless (created without first fetching) create op conflict cases:
- a versionless create op that conflicts with another crea... | diff --git a/lib/submit-request.js b/lib/submit-request.js
index b1e1b066d..5c33fb9b1 100644
--- a/lib/submit-request.js
+++ b/lib/submit-request.js
@@ -109,7 +109,7 @@ SubmitRequest.prototype.submit = function(callback) {
// case, we should return a non-fatal 'Op already submitted' error. We
// must ... | 2 | 1 | 0 | [{"id": "G0", "claim": "The new `_create`-metadata approach opens a corner case where a client that reconnects and resubmits a create op after a delete-and-recreate may be incorrectly rejected with `DOC_ALREADY_CREATED` instead of the non-fatal `OP_ALREADY_SUBMITTED`.", "category": "correctness", "verdict": "opposed", ... | null |
share__sharedb__679 | share/sharedb | 679 | defect | 297ce5dc66563a5955311793a475768d73ac8b87 | 87ef11d26dbc7cb4c19104ccf9c19365ec49c0af | ⚡️ Cache latest op version when broadcasting presence | At the moment, when sending a presence update to other subscribers, we [call `transformPresenceToLatestVersion()`][1] for every presence update which internally [calls `getOps()`][2] for every presence update.
Calls to `getOps()` can be expensive, and rapid presence updates may cause undue load on the server, even w... | diff --git a/lib/agent.js b/lib/agent.js
index f55f1f9f4..4b11e1e54 100644
--- a/lib/agent.js
+++ b/lib/agent.js
@@ -48,6 +48,10 @@ function Agent(backend, stream) {
// request if the client disconnects ungracefully. This is a
// map of channel -> id -> request
this.presenceRequests = Object.create(null);
+ /... | 1 | 1 | 1 | [{"id": "G0", "claim": "_unsubscribeDocVersion does not clean up this.latestDocVersions, so a long-lived client that goes through many docs accumulates tons of old entries in that map (immediate cleanup may worsen the multiple-null-presence case, so perhaps a delayed cleanup).", "category": "performance", "verdict": "s... | null |
share__sharedb__682 | share/sharedb | 682 | defect | 945dc50ebc93d53e7306c522226bd804a802bc49 | 9318db885c8b98b3cf3232639156efe213338faa | ⚡️ Avoid committing no-ops to the database | This change checks for no-ops just before committing, and avoids writing them to the database.
Motivation
----------
Sometimes we have situations where multiple clients try to make an identical change to the same document at the same time (if multiple clients are trying to keep two documents in sync, for example).... | diff --git a/lib/client/doc.js b/lib/client/doc.js
index dd702eace..acb457374 100644
--- a/lib/client/doc.js
+++ b/lib/client/doc.js
@@ -328,6 +328,15 @@ Doc.prototype._handleSubscribe = function(error, snapshot) {
Doc.prototype._handleOp = function(err, message) {
if (err) {
+ if (err.code === ERROR_CODE.ERR_... | 2 | 2 | 0 | [{"id": "G0", "claim": "The no-op avoidance and client error handling should be opt-in behind a feature flag, since the new behavior may be a breaking change for existing clients.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Documentation should be add... | null |
share__sharedb__684 | share/sharedb | 684 | defect | 945dc50ebc93d53e7306c522226bd804a802bc49 | a7976d474b6f288d3daa3dbaa7fcb62e2d4a0cc5 | ✨ Store client protocol on `Agent` | When developing new features, it will be useful to be able to compare server and client protocol versions.
For example, if a server is ahead of an old client, the server could gracefully degrade performance for clients that don't support the new functionality.
This change stores the client's protocol on the `Agen... | diff --git a/lib/agent.js b/lib/agent.js
index a3ee100d6..1352d6600 100644
--- a/lib/agent.js
+++ b/lib/agent.js
@@ -4,6 +4,7 @@ var logger = require('./logger');
var ACTIONS = require('./message-actions').ACTIONS;
var types = require('./types');
var util = require('./util');
+var protocol = require('./protocol');
... | 2 | 1 | 1 | [{"id": "G0", "claim": "checkAtLeast compares major with >= while also requiring minor >=, so a newer major version against an older one (e.g. 2.0 > 1.1) would fail the check.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Reviewer asks to confirm t... | null |
share__sharedb__692 | share/sharedb | 692 | defect | ca50594b7eff8f159fe262acc0408377d1d3f3e3 | d6842e4a45bab313d74fffb062c32f08730be474 | 🐛 Wrong error when submitting ops during hard rollback. | After doing the steps:
1. Create a doc with rich text type (or any other non irreversible type)
2. Make op submission fail
3. Now in the hard rollback we do `this._setType(null);`
4. If there is any op comming before the hard rollback `fetch` is finished, we get the error
```
Cannot submit op. Document has not be... | diff --git a/lib/client/doc.js b/lib/client/doc.js
index acb457374..89a49f618 100644
--- a/lib/client/doc.js
+++ b/lib/client/doc.js
@@ -70,6 +70,8 @@ function Doc(connection, collection, id) {
this.pendingFetch = [];
this.pendingSubscribe = [];
+ this._isInHardRollback = false;
+
// Whether we think we are... | 3 | 3 | 1 | [{"id": "G0", "claim": "The hard-rollback error should be constructed after the ERR_DOC_DOES_NOT_EXIST error so it overrides the default error, avoiding duplication of the callback/emit() machinery.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": ... | null |
sharebook-kr__pykrx__282 | sharebook-kr/pykrx | 282 | defect | 7a5f828c80a502629ec14d59da8bbb1a39de8b48 | a81786517d9343bed2481ed04caa343441abd54e | KRX 로그인 기능 추가 및 pytest 수정 | krx 홈페이지에서 작년 말 로그인을 필수로 하도록 정책이 바뀌었습니다.
[ISSUE-276](https://github.com/sharebook-kr/pykrx/issues/276)에서 제공해주신 login session을 생성하는 방식으로 수정했습니다.
`KRX_ID` / `KRX_PW`를 환경 변수로 등록하고 사용하시면 됩니다.
```
export KRX_ID=***
export KRX_PW=***
# or
KRX_ID=*** KRX_PW=*** uv run python *.py
```
ID/PWD를 사용하는 만큼 개인 계... | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7ce3c17..656e62e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -89,8 +89,6 @@ jobs:
python-version: "3.11"
- os: macos-latest
python-version: "3.11"
- - os: windows-latest
- ... | 7 | 2 | 1 | [{"id": "G0", "claim": "login_krx() assumes the login response is JSON (resp.json()), but KRX can return non-JSON (HTML/error page) on auth/rate-limit/region blocking, which would raise and potentially break imports/requests; it should check resp.ok/Content-Type and handle JSON decode failures before calling .json().",... | null |
sharkdp__bugreport__11 | sharkdp/bugreport | 11 | defect | 456eb0dc57d1d278f5289f831faf7c2fa361eeb8 | cb138df50089dc1b0666d8fedd5a843a03d4423a | New collector `DirectoryEntries` | The use case I have in mind is to add info about custom assets to bat. If we add this line to bat:
```
.info(DirectoryEntries::new("Custom assets", PROJECT_DIRS.cache_dir()))
```
we will get output in `--diagnostics` that look like this if custom assets are installed:
```
#### Custom assets
- met... | diff --git a/Cargo.toml b/Cargo.toml
index 6502ecb..c0652d7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -30,3 +30,7 @@ format_plaintext = []
sys-info = { version = "0.9", optional = true }
git-version = { version = "0.3", optional = true }
shell-escape = "0.1"
+
+[dev-dependencies]
+pretty_assertions = "1.1.0"
+temp... | 4 | 2 | 1 | [{"id": "G0", "claim": "The DirectoryEntries constructor should take the title and path via AsRef parameters like the other collectors (FileContent, SoftwareVersion, EnvironmentVariables) so the public interfaces stay consistent, instead of `impl Into<String>`/`impl Into<PathBuf>`.", "category": "design", "verdict": "s... | null |
sharkdp__bugreport__8 | sharkdp/bugreport | 8 | defect | 0f0983e6a285e0864f1dba2f328772ab2df4f605 | 6fa0593bdcbe37e0ddafc12e88c0981bcb905e6b | Silently ignore missing git repo, and add regression tests | The first commit adds regression tests. See new `test-crates/README.md` for details
The second commit makes bugreport silently ignore missing git repo even with the git_hash feature enabled.
If an official release of a dependent project is built with e.g. `cargo install <name>`, there will be no git repo availabl... | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3474b93..68a71f2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -102,18 +102,14 @@ jobs:
use-cross: ${{ matrix.job.use-cross }}
command: run
args: --target ${{ matrix.job.target }} --example=... | 3 | 3 | 0 | [{"id": "G0", "claim": "The dots in the version regex `0.1.0` asserted by the integration test should be escaped so the test only matches the literal version string.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Fix the typo in test-crates/README.md wh... | null |
sharkdp__dbg-macro__127 | sharkdp/dbg-macro | 127 | defect | 4db61805d90cb66d91bcc56c2703591a0127ed11 | 263330ede3584c4c043ce9e54c08ff802b33765b | Support for STL Container adapters | Fixes #125
Adapters are detected by checking existence of underlying container using `container_type`. `pop` operation is specialised for each of the adapters (`std::stack`, `std::queue` and `std::priority_queue`) to remove and return the top/front element.
Have extended tests and demos as well. | diff --git a/dbg.h b/dbg.h
index 64c5ca6..505a7eb 100644
--- a/dbg.h
+++ b/dbg.h
@@ -46,7 +46,9 @@ License (MIT):
#include <ios>
#include <iostream>
#include <memory>
+#include <queue>
#include <sstream>
+#include <stack>
#include <string>
#include <tuple>
#include <type_traits>
@@ -312,6 +314,38 @@ using std::s... | 2 | 1 | 1 | [{"id": "G0", "claim": "Container adapters should be printed with the topmost/most-recently-accessed element on the right ({1, 2, 3} for a stack built by push(1),push(2),push(3)), collecting popped elements into a temporary vector if needed, instead of the reversed {3, 2, 1} output.", "category": "design", "verdict": "... | null |
sharkdp__dbg-macro__128 | sharkdp/dbg-macro | 128 | defect | 43a654a40bc3fd172b4a35f8078c4899d8217ffc | 22d489b1a509aa80cde63cb27314807a2eccfb26 | Prefer bitsize variant over standard integral types | Fixes #69
Have adapted some tests, replaced some types in const, pointer tests to keep code clean.
**Note** : Although the CI checks are all passing, the standard does not mandate fixed width integer types to be available. Though very rare, there might be cases when these are undefined (embedded applications is ... | diff --git a/dbg.h b/dbg.h
index bb4d7cf..ebd86a5 100644
--- a/dbg.h
+++ b/dbg.h
@@ -202,21 +202,20 @@ std::string type_name() {
return get_type_name(type_tag<T>{});
}
-inline std::string get_type_name(type_tag<short>) {
- return "short";
-}
-
-inline std::string get_type_name(type_tag<unsigned short>) {
- retu... | 2 | 2 | 1 | [{"id": "G0", "claim": "The clang-format line wrapping in tests/example.cpp should be reverted, int32_t should be used throughout example.cpp (both in the code and in the output comments), and the updated file copied over to the README example.", "category": "maintainability", "verdict": "supported", "priority": "P2", ... | null |
sharkdp__dbg-macro__129 | sharkdp/dbg-macro | 129 | defect | 3c755ee32138e9df8636276b8c6f2e38f466d47c | db660fec455a5705396bd27dc6a105a1c5df3eff | [Bugfix] Incorrect typename for multidimensional c-style arrays | Fixes a bug introduced in [cf4ad54](https://github.com/sharkdp/dbg-macro/pull/128/commits/cf4ad54c12c7c91e2417b2188011da7326fa121a) which caused dimensions of multidimensional arrays to be formatted in reverse order.
Buggy output
---
```cpp
int a[1][2][3];
dbg(a); // ... (int32_t [3] [2] [1])
```
Have exten... | diff --git a/dbg.h b/dbg.h
index e9bcfa2..a026b2c 100644
--- a/dbg.h
+++ b/dbg.h
@@ -166,7 +166,8 @@ template <typename T>
struct type_tag {};
template <int&... ExplicitArgumentBarrier, typename T>
-std::string get_type_name(type_tag<T>) {
+typename std::enable_if<(std::rank<T>::value == 0), std::string>::type
+get... | 1 | 1 | 0 | [{"id": "G0", "claim": "The formatted name of C-style arrays should have no space between the element type and the dimensions (e.g. `int[3]` instead of `int [3]`).", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
sharkdp__dbg-macro__68 | sharkdp/dbg-macro | 68 | defect | c7424695eff81dd34c7a0614160492ce1b4f0c08 | 6065df4e89b692a31fe6866ff95880998cc2b7f9 | Integral number formatting support | attempts to solve #61
This let's us write
```c++
uint32_t x = /* … */;
dbg(dbg::hex(x));
dbg(dbg::oct(x));
```
The values currently print out like this:

| diff --git a/dbg.h b/dbg.h
index 4a1cf6a..3d3f71d 100644
--- a/dbg.h
+++ b/dbg.h
@@ -53,7 +53,7 @@ License (MIT):
#include <variant>
#endif
-namespace dbg_macro {
+namespace dbg {
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
inline bool isColorizedOutputEnabled() {
@@ -73,17 +73,17 @@ name... | 2 | 1 | 1 | [{"id": "G0", "claim": "dbg::hex/dbg::oct should also accept and correctly print signed integral types (e.g. print -0xABC123) instead of static_asserting that only unsigned integral types are supported, so users are not forced to cast to an unsigned type.", "category": "design", "verdict": "supported", "priority": "P1"... | null |
sharkdp__dbg-macro__71 | sharkdp/dbg-macro | 71 | defect | 50f0cce3cd51712b3b0c64e6abe4b5b19fb58930 | 328ea80f3b0fec61e51c933462168925bf898d63 | Adds printing of std::pair | Closes #70
@sharkdp please let me know if this is a good way to properly implement this. I have not done this bit before.
My reasoning for `type_name` was I noticed that a string passed to the pair would have their type printed as `std::__cxx11::basic_string` and I was not entirely sure how you were dealing wit... | diff --git a/dbg.h b/dbg.h
index 2783f0b..d1f85c4 100644
--- a/dbg.h
+++ b/dbg.h
@@ -200,6 +200,11 @@ std::string get_type_name(type_tag<std::vector<T, std::allocator<T>>>) {
return "std::vector<" + type_name<T>() + ">";
}
+template <typename T1, typename T2>
+std::string get_type_name(type_tag<std::pair<T1, T2>>... | 3 | 3 | 0 | [{"id": "G0", "claim": "Move the pair-printing dbg() demonstration calls out of the top of tests.cpp and formulate them as actual assertions in the tests-section of that file (the pretty_print tests section).", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim"... | null |
sharkdp__dbg-macro__82 | sharkdp/dbg-macro | 82 | defect | bab343c79cc604919cf6e411041771fa54222c45 | 6dc10f4534d8337dc3ee80cb650f70028ceb1c6e | Add binary printing support | This PR would close #81 based on method 2 outlined in that issue. | diff --git a/dbg.h b/dbg.h
index d5ad751..a7b7c7f 100644
--- a/dbg.h
+++ b/dbg.h
@@ -117,6 +117,8 @@ struct print_formatted {
return "0o";
case 16:
return "0x";
+ case 2:
+ return "0b";
default:
return "";
}
@@ -136,6 +138,11 @@ print_formatted<T> oct(T value) {... | 2 | 2 | 2 | [{"id": "G0", "claim": "decimalToBinary should be rewritten as a type-generic, index-based implementation with zero padding like hex and oct, avoiding std::reverse, and the later insert-based version is O(n^2) in the number of bits and significantly slower.", "category": "design", "verdict": "supported", "priority": "P... | null |
sharkdp__hexyl__154 | sharkdp/hexyl | 154 | defect | a23645ddfdc1d26a64f2d6d6894ac577058df134 | 689cc220de8b6e8712e9cd904e5e52694aaecad0 | Added `--plain` `--no-chars` and `--no-position` toggles | New flags added:
```
OPTIONS:
-p, --plain Display output with --no-chars, --no-position, and
--border=none.
-C, --no-chars Whether to display the character table on the right.
-P, --no-position Whether to display the position indic... | diff --git a/examples/simple.rs b/examples/simple.rs
index 7470d879..1d564985 100644
--- a/examples/simple.rs
+++ b/examples/simple.rs
@@ -12,9 +12,18 @@ fn main() {
let mut handle = stdout.lock();
let show_color = true;
+ let show_char_table = true;
+ let show_position_indicator = true;
let use_... | 5 | 5 | 1 | [{"id": "G0", "claim": "The new byte_char_table code fails cargo clippy on the project's minimum supported Rust 1.46, so an alternative is needed if the project stays bound to that version.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The --plain ... | null |
sharkdp__hexyl__170 | sharkdp/hexyl | 170 | defect | 0caab152555887dd109701847c94b1a3dd39dd8a | 0a0cbfba8c756cd5dab5016e93a39862be9d518a | Support byte grouping | This PR is going to support different sizes of data which can almost fit the requirement of #104, without the endian option. Since there's some "magic" number (e.g. the number "25") related to this originally, I also try my best to replace those with a specific abstraction so we can simpler add more features accordingl... | diff --git a/examples/simple.rs b/examples/simple.rs
index a7996c19..4f4b6717 100644
--- a/examples/simple.rs
+++ b/examples/simple.rs
@@ -18,6 +18,7 @@ fn main() {
.with_border_style(BorderStyle::Unicode)
.enable_squeezing(false)
.num_panels(2)
+ .num_group_bytes(1)
.build();... | 5 | 5 | 4 | [{"id": "G0", "claim": "The new group-bytes feature ships without an (integration) test; one should be added.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The PR's clap CLI code must be updated to the clap v4 API that the upstream merge introduced: `.... | null |
sharkdp__hexyl__195 | sharkdp/hexyl | 195 | defect | 2a534483c8b186622d85cd79bde0edf3d98b862c | 2265f918fbc159c6a3b656712bf342c87f1b8da9 | Implement character table control and codepage 437 option | Implements #194
Additional comments:
- I've directly copy-pasted the codepage table from the repository in the blog post you linked. I'm not sure how to properly give credit for it.
- I replaced the null character with the ⋄ character since null doesn't appear in printed output, which is pretty common. | diff --git a/src/bin/hexyl.rs b/src/bin/hexyl.rs
index 5456c321..54dbb7b2 100644
--- a/src/bin/hexyl.rs
+++ b/src/bin/hexyl.rs
@@ -17,7 +17,7 @@ use thiserror::Error as ThisError;
use terminal_size::terminal_size;
-use hexyl::{Base, BorderStyle, Endianness, Input, PrinterBuilder};
+use hexyl::{Base, BorderStyle, C... | 13 | 13 | 3 | [{"id": "G0", "claim": "The copied CP437 table carries no attribution: paste the MIT license text verbatim into a comment preceding the table, add a reference to the original source file and author, and describe the manual modifications there.", "category": "documentation", "verdict": "supported", "priority": "P2", "sc... | null |
sharkdp__hexyl__248 | sharkdp/hexyl | 248 | defect | 742c2fcbfd117b5c9eeff94dfe3324d9890db699 | 6bfce859794e2af9e85c541f44865b0774fbe4c6 | Enable custom colors with environment variables | Hello!
I really like `hexyl` but the default colors of green and cyan look too similar on my terminal (first output in screenshot below). I was surprised they aren't already customizable (there's issue https://github.com/sharkdp/hexyl/issues/220 for this), so I took a stab at enabling customization via env vars. It ... | diff --git a/Cargo.toml b/Cargo.toml
index 8c35489c..c98ca4a8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,7 +9,7 @@ readme = "README.md"
repository = "https://github.com/sharkdp/hexyl"
version = "0.16.0"
edition = "2021"
-rust-version = "1.74"
+rust-version = "1.80"
[dependencies]
anyhow = "1.0"
diff --git a/... | 1 | 1 | 0 | [{"id": "G0", "claim": "The color environment variables should use a `HEXYL_COLOR_` prefix instead of `HEXYL_` (e.g. `HEXYL_COLOR_OFFSET` rather than `HEXYL_OFFSET`, whose name does not convey that it sets a color).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
sharkdp__hyperfine__447 | sharkdp/hyperfine | 447 | defect | 4b419c6ab48a2018a5418fb4b70e25dcc401eba1 | b810ae81956778a6bc28ca02dedefec5fe1340f7 | Add support for one run with --runs=1 | Extend the --runs=N option added in d78c33b (Added options to specify
the max/exact numbers of runs., 2018-09-09) to support --runs=1
instead of dying with a usage error.
This is useful to do ad-hoc testing of your commands while they might
still have syntax errors, or just for doing one run where you don't
care... | diff --git a/src/benchmark.rs b/src/benchmark.rs
index 5a0526976..0fe23b4e7 100644
--- a/src/benchmark.rs
+++ b/src/benchmark.rs
@@ -391,7 +391,10 @@ pub fn run_benchmark(
// Compute statistical quantities
let t_num = times_real.len();
let t_mean = mean(×_real);
- let t_stddev = standard_deviatio... | 3 | 3 | 1 | [{"id": "G0", "claim": "The \"± 0.00\" output in the \"faster than\" comparison line should probably be adjusted too for the one-run case this PR enables.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The clippy warnings on the added code in src/be... | null |
sharkdp__hyperfine__448 | sharkdp/hyperfine | 448 | defect | 4b419c6ab48a2018a5418fb4b70e25dcc401eba1 | 9c275afaac9b93daa15a3f9df32e700024539a55 | Add --setup (-b) option, like --prepare but runs once per batch, steal -s from --style | Add --setup (-s) option, like --prepare but runs once per batch
Add a --setup option for the use-case of wanting to do one-off setup
before a set of benchmarks, not the once-per-test setup that --prepare
does. This is useful for the cases noted in the updated documentation.
Per the feedback on https://github.co... | diff --git a/doc/hyperfine.1 b/doc/hyperfine.1
index e4a51ad39..265f63839 100644
--- a/doc/hyperfine.1
+++ b/doc/hyperfine.1
@@ -62,6 +62,12 @@ Perform at most \fImaxruns\fP (number) runs for each command. Default: no limit.
Perform exactly \fIruns\fP (number) runs for each command. If this option is not specified,
\... | 5 | 5 | 1 | [{"id": "G0", "claim": "The new option should be named --setup instead of --build, since building is only one of its uses (the help text can still use the build example).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G2", "claim": "The example command in the man page ... | null |
sharkdp__hyperfine__563 | sharkdp/hyperfine | 563 | defect | c7e56942f7d32e8bacab055c743bc0d3f17680b1 | 54a7a898b9f9a7eeebf474eab5a02f40b7c72dc3 | Add --input argument | This argument accepts a path to a file. The data contained in the file will be passed to the command via stdin.
Closes sharkdp/hyperfine#541 | diff --git a/src/benchmark/executor.rs b/src/benchmark/executor.rs
index a8f84a9c6..4561419d5 100644
--- a/src/benchmark/executor.rs
+++ b/src/benchmark/executor.rs
@@ -1,7 +1,9 @@
use std::process::{ExitStatus, Stdio};
use crate::command::Command;
-use crate::options::{CmdFailureAction, CommandOutputPolicy, Option... | 8 | 8 | 1 | [{"id": "G0", "claim": "Move the new `command_input_policy` field above `command_output_policy` in the Options struct to keep input before output.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Fix the unused import `Stdio` warning in src/benchm... | null |
sharkdp__numbat__122 | sharkdp/numbat | 122 | defect | 86df7f3fd86437dc073c4da9f7a32403dcc357a3 | 868500543b286d540a5ccd28fe18d99a9f64d192 | Add factorial operator | Fixes https://github.com/sharkdp/numbat/issues/110.
TODOs:
- [x] Add tests
- [x] Use better factorial implementation (error out on negative numbers or decimal expressions)
- [x] Rename `operand` to `expr`(?)
- [ ] ~~Const evaluation of factorial expressions~~ Decided not to support it
- [x] Take a look at all t... | diff --git a/numbat/src/ast.rs b/numbat/src/ast.rs
index 1388d9f56..c15d63781 100644
--- a/numbat/src/ast.rs
+++ b/numbat/src/ast.rs
@@ -6,6 +6,12 @@ use crate::{
pretty_print::PrettyPrint, resolver::ModulePath,
};
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum UnaryOperator {
+ Factorial,
+ Nega... | 6 | 5 | 2 | [{"id": "G0", "claim": "The parser's factorial function should be turned into a loop, otherwise chained factorials like `3!!` fail with a 'Trailing characters' parse error instead of parsing as `(3!)!`.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": ... | null |
sharkdp__numbat__190 | sharkdp/numbat | 190 | defect | 8d52de96ca341a21b9316cb86737b466718db9d3 | ee54ce8227ab89ad20a954400c5cee7e4cf1d015 | Allow underscores in integers with bases | Hey, it would be nice to allow underscores in numbers with bases. | diff --git a/Cargo.lock b/Cargo.lock
index 5a7afa4a2..e2f83453b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -46,7 +46,7 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
dependencies = [
- "windows-sys",... | 6 | 5 | 2 | [{"id": "G0", "claim": "Add tests for underscored base-prefixed integers, and disallow forms like `0x_0`, `0x0_` and definitely `0x_`, which currently leads to a confusing \"overflow in number literal\" error.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "c... | null |
sharkdp__numbat__209 | sharkdp/numbat | 209 | defect | c68f8415abb6f922493cd2327b28647c996602bc | 02a0a44cec7ebc54cce8adabf10c1ad246e2599b | Add support for prefix unary plus operator | Fix #120
Hey, I was looking for easy-to-implement issues just to improve my understanding of the code base.
Let me know if you have other ideas | diff --git a/examples/parse_error/duplicated_operator.nbt b/examples/parse_error/duplicated_operator.nbt
deleted file mode 100644
index 8778067a5..000000000
--- a/examples/parse_error/duplicated_operator.nbt
+++ /dev/null
@@ -1 +0,0 @@
-123 ++ 321
diff --git a/numbat-cli/tests/integration.rs b/numbat-cli/tests/integrat... | 1 | 1 | 1 | [{"id": "G0", "claim": "Revert the `2 ++ 3` integration test to still fail with a non-zero exit status on parser errors, using an expression that remains invalid.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
sharkdp__numbat__222 | sharkdp/numbat | 222 | defect | 81d1a6af960db156526962d603c391cd7a022fe4 | d2579d4265db2f7af862ea7a8444784d9794b6dc | add `help` (and `?`) commands to numbat REPL | This resolves #175 .
I implemented an `insect`-like `help` command for the REPL (with `?` as an alias) by writing the package description, running a few examples through the REPL itself and then printing the link to the online documentation. The examples are printed along with the prompt to show the user how it woul... | diff --git a/numbat-cli/Cargo.toml b/numbat-cli/Cargo.toml
index b080ef97e..bf5befe1f 100644
--- a/numbat-cli/Cargo.toml
+++ b/numbat-cli/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "numbat-cli"
-description = " A statically typed programming language for scientific computations with first class support for physical ... | 9 | 8 | 1 | [{"id": "G0", "claim": "The help examples are evaluated in the user's own REPL context, so running `numbat --no-prelude` and typing `help` yields \"unknown identifier: km\" and examples can pollute the user namespace; the reviewer suggests creating a fresh Numbat `Context` for running the help examples.", "category": "... | null |
sharkdp__numbat__228 | sharkdp/numbat | 228 | defect | 00c6c97a83d22909b4e32f29b096ea3c39559c38 | cdec339f8eb5d460edebc78835ab786cae5a4c0b | Output multiple diagnostics in one command | Hey,
The more I use `numbat` and, the more it bothers me that it returns the errors one by one 😅
Especially in the cli or on my small discord bot that adds a huge delay to each test you want to make.
Since most languages are able to return multiple all the errors they encounter at once, I thought it could be a... | diff --git a/numbat-wasm/src/lib.rs b/numbat-wasm/src/lib.rs
index b5638c038..fd75a847d 100644
--- a/numbat-wasm/src/lib.rs
+++ b/numbat-wasm/src/lib.rs
@@ -144,7 +144,9 @@ impl Numbat {
let resolver = self.ctx.resolver();
- term::emit(&mut writer, &config, &resolver.files, &error.diagnostic()).unwr... | 2 | 2 | 1 | [{"id": "G0", "claim": "The new `stop_on_error` argument is set to `true` for imported modules but not for the top-level program with no clear reason; it should not be configurable — remove the argument, if possible, so errors are always accumulated.", "category": "design", "verdict": "supported", "priority": "P1", "sc... | null |
sharkdp__numbat__272 | sharkdp/numbat | 272 | defect | 57ae6ecffb3593af509682c1c8602f3691eed8fd | f2a4449e4a5c7487afe83d110b4eb1a2badad461 | Logical operators | Fix #196 | diff --git a/numbat/src/ast.rs b/numbat/src/ast.rs
index 1d735631f..5787b7a95 100644
--- a/numbat/src/ast.rs
+++ b/numbat/src/ast.rs
@@ -10,6 +10,7 @@ use num_traits::Signed;
pub enum UnaryOperator {
Factorial,
Negate,
+ LogicalNeg,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
@@ -26,6 +27,8 @@ pub ... | 2 | 2 | 0 | [{"id": "G0", "claim": "Reword the test comment in numbat/src/parser.rs to say \"the 'and' operator has the highest priority\" instead of \"the and binop has the maximum priority\".", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Reword the test co... | null |
sharkdp__numbat__312 | sharkdp/numbat | 312 | defect | 8a4816048ea8d8f258d8f8d719d933423da66c08 | f8ec0af5ed4469c2a36fa8b962f61c65d7732130 | Extended number formatting | Fixes #264.
TODO:
- [x] Add format specifiers for strings (and possibly other types?)
- [x] Fix todos
- [x] Check that format specifiers are valid (currently anything invalid will crash Numbat)
- [x] Fix units not being printed in quantity interpolations with format specifiers
- [ ] Research possible choices ... | diff --git a/numbat/src/ast.rs b/numbat/src/ast.rs
index 5787b7a95..b6adbdf07 100644
--- a/numbat/src/ast.rs
+++ b/numbat/src/ast.rs
@@ -57,7 +57,11 @@ impl PrettyPrint for BinaryOperator {
#[derive(Debug, Clone, PartialEq)]
pub enum StringPart {
Fixed(String),
- Interpolation(Span, Box<Expression>),
+ Int... | 4 | 2 | 1 | [{"id": "G0", "claim": "Instead of the `precision: Option<u64>` field on StringPart::Interpolation, use a `specifiers` field (suggested: `specifiers: Vec<Specifier>`).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The parser's specifier-parsing code is ... | null |
sharkdp__numbat__435 | sharkdp/numbat | 435 | defect | 611610ca9811fa697f39e839b0972a43c9c3f1fa | 9b2a461a7f9e194b751d6c8cdbdea4dc84442693 | Function decorators | This PR addresses #421, enables decorators for functions and extends the `info` command to functions.
An additional `@description()` decorator is introduced which can be used on functions, as well as variables and units. If applied several times on the same function/variable/unit the descriptions are joined.
Ther... | diff --git a/book/src/cli-usage.md b/book/src/cli-usage.md
index 715de709a..81aff5b11 100644
--- a/book/src/cli-usage.md
+++ b/book/src/cli-usage.md
@@ -37,7 +37,7 @@ There is a set of special commands that only work in interactive mode:
|---------|--------|
| `list`, `ls` | List all functions, dimensions, variables ... | 4 | 4 | 1 | [{"id": "G0", "claim": "The @description of `datetime` should mention or link to the supported date-time formats (via the added sentence or by putting that URL in @url).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Deriving the signature by re-i... | null |
sharkdp__numbat__527 | sharkdp/numbat | 527 | defect | c60b304d70887d95fe6af68657657db5398d641c | 4954d332020e72d1025446fdda03c078221f1035 | Improve error message for assert_eq/3 | Closes #505
Improves the error message for assert_eq/3 using consistent units for the input comparands (quantities). Before the change, the error message may have caused confusion as different units are used for the comparands.
Converting everything to the units of epsilon is intuitive and allows a user to see th... | diff --git a/book/src/procedures.md b/book/src/procedures.md
index a5244183c..6bd264f3d 100644
--- a/book/src/procedures.md
+++ b/book/src/procedures.md
@@ -47,7 +47,9 @@ assert_eq(q1, q2, ε)
```
where the first version tests for exact equality while the second version tests for approximate
-equality \\( |q_1-q_2| ... | 7 | 5 | 2 | [{"id": "G0", "claim": "Converting both comparands to the epsilon's units before comparing could change assert_eq/3 results in some edge cases, making this a possibly breaking change.", "category": "correctness", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "There should be a si... | null |
sharkdp__numbat__647 | sharkdp/numbat | 647 | defect | f064611bcc3378685c6b9667d9f9cfe46b104f8c | eced4dbbe2d1768bd16dd1ae82dfec0260398304 | Fixed NaN comparison | All comparisons involving at least one NaN now return false, regardless of units
Closes #644 | diff --git a/numbat/src/interpreter/assert_eq.rs b/numbat/src/interpreter/assert_eq.rs
index b3b879a74..e29a53dcf 100644
--- a/numbat/src/interpreter/assert_eq.rs
+++ b/numbat/src/interpreter/assert_eq.rs
@@ -3,7 +3,7 @@ use compact_str::{format_compact, CompactString};
use std::fmt::Display;
use thiserror::Error;
... | 2 | 2 | 0 | [{"id": "G0", "claim": "The QuantityOrdering enum could wrap std::cmp::Ordering in an Ok variant instead of duplicating Less/Equal/Greater variants, which would lead to slightly less code.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The None arm of th... | null |
sharkdp__numbat__695 | sharkdp/numbat | 695 | defect | b7f9d8e130b3303d118569f0ab1ea265e29d87b0 | 445abef2d2f37c44d7c51d360f1fc0878d3f7c52 | Multi factorial | Hey, currently numbat doesn't handle multifactorial correctly, see the following screenshot:

This should in fact returns (5 * 3 * 1): https://en.wikipedia.org/wiki/Double_factorial#Generalizations
This PR adds support for a... | diff --git a/numbat/src/ast.rs b/numbat/src/ast.rs
index 3f4760637..d3acf43dd 100644
--- a/numbat/src/ast.rs
+++ b/numbat/src/ast.rs
@@ -1,3 +1,5 @@
+use std::num::NonZeroUsize;
+
use crate::markup as m;
use crate::resolver::ModulePathBorrowed;
use crate::span::Span;
@@ -11,7 +13,7 @@ use num_traits::Signed;
#[de... | 1 | 1 | 1 | [{"id": "G0", "claim": "The double-factorial tests should be expanded with more edge cases and an example for even numbers, and ideally be written as a Numbat-source test suite with assert_eq so the expected result is easy to see.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}... | null |
shaun0927__openchrome__1065 | shaun0927/openchrome | 1,065 | defect | dffb099b27c49418aca49c258851e6028522fa2a | 84c4041eaa12500fc32ecd9faed8ec33cbae02ff | feat(core): best-first URL scoring strategy for crawl workloads (#983) | ## Progress / Review status
_Auto-refreshed 2026-05-13 — owner comments cleaned up to reduce review noise._
| Field | Value |
| --- | --- |
| Branch | `feat/983-best-first` → `develop` |
| Draft | no |
| CI | ✅ all 9 checks passing |
| Mergeable | ❌ CONFLICTING |
| Review decision | — |
| Codex (latest) | 💡 suggesti... | diff --git a/src/core/crawl/url-scorer.ts b/src/core/crawl/url-scorer.ts
new file mode 100644
index 000000000..9bad17597
--- /dev/null
+++ b/src/core/crawl/url-scorer.ts
@@ -0,0 +1,162 @@
+export interface UrlScoreOptions {
+ query?: string;
+ keywords?: string[];
+ preferPaths?: string[];
+ excludePaths?: string[]... | 7 | 3 | 3 | [{"id": "G0", "claim": "scoreUrl calls decodeURIComponent(parsed.pathname) without a guard, so a URL with malformed percent-encoding throws and aborts the whole best_first crawl instead of just assigning that URL a low score.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"},... | null |
shaun0927__openchrome__1070 | shaun0927/openchrome | 1,070 | defect | 34a64c8cc3588b45bf7d2aa6f9144de469d2cad7 | 4b48ada63e5a2a76208fa32e84516a95d10aa2ed | feat(read_page): expose opt-in snapshot diagnostics | ## Progress / Review status
_Auto-refreshed 2026-05-13 — owner comments cleaned up to reduce review noise._
| Field | Value |
| --- | --- |
| Branch | `feat/971-read-page-diagnostics` → `develop` |
| Draft | no |
| CI | ⏳ 8/9 passing — 1 pending |
| Mergeable | ✅ MERGEABLE |
| Review decision | — |
| Codex (latest) |... | diff --git a/src/tools/read-page.ts b/src/tools/read-page.ts
index 5c7276cc2..219e68275 100644
--- a/src/tools/read-page.ts
+++ b/src/tools/read-page.ts
@@ -125,11 +125,28 @@ const definition: MCPToolDefinition = {
enum: ['none', 'dom'],
description: 'AX mode only: use "dom" to explicitly fall back to... | 2 | 1 | 1 | [{"id": "G0", "claim": "When diagnostics is enabled and mode is omitted, diagnostics.mode is initialized to \"dom\" up front and never corrected when DOM serialization fails and the handler falls through to AX output, so the response content is AX while diagnostics still says \"dom\", which makes the new telemetry misl... | null |
shaun0927__openchrome__1071 | shaun0927/openchrome | 1,071 | defect | dffb099b27c49418aca49c258851e6028522fa2a | 7317ae1cbfe247de20a3a84eb247d3253c78915c | feat(read_page): surface custom interactive controls | ## Summary
- Extends DOM `read_page` interactive filtering to surface custom controls that are clickable but lack semantic tags/roles.
- Detects cursor-pointer, inline/JS onclick, valid tabindex, contenteditable, and hidden radio/checkbox state hints only when `interactiveOnly`/`filter: "interactive"` is active.
- Anno... | diff --git a/src/dom/dom-serializer.ts b/src/dom/dom-serializer.ts
index b81aaa923..dce0b171f 100644
--- a/src/dom/dom-serializer.ts
+++ b/src/dom/dom-serializer.ts
@@ -92,6 +92,8 @@ const CONTAINER_TAGS = new Set([
'div', 'section', 'article', 'main', 'aside', 'header', 'footer', 'nav', 'span',
]);
+const INTERA... | 4 | 4 | 4 | [{"id": "G0", "claim": "When interactiveOnly is enabled, serializeDOM hard-fails if markCursorInteractiveElements exceeds its 5s timeout or throws, so large or script-heavy pages can make read_page fail entirely instead of returning partial interactive output; wrap the pre-scan in a fallback path that continues without... | null |
shaun0927__openchrome__1072 | shaun0927/openchrome | 1,072 | defect | 34a64c8cc3588b45bf7d2aa6f9144de469d2cad7 | 897932d72ba3162043bded5f216ab6cb0da87a57 | feat(harness): add opt-in auto snapshot policy foundation (#1013) | ## Summary
Implements the foundation for #1013 with a small, opt-in automatic session snapshot policy module.
This PR intentionally avoids broad workflow/task-ledger wiring because several orchestration-adjacent PRs are already open. Instead it adds the reusable, side-effect-free policy layer that those surfaces can ... | diff --git a/src/self-healing.ts b/src/self-healing.ts
index 75b8e8f8c..dfe7f64e2 100644
--- a/src/self-healing.ts
+++ b/src/self-healing.ts
@@ -16,3 +16,20 @@ export type { EventLoopMonitorOptions, BlockEvent } from './watchdog/event-loop-
export { HealthEndpoint } from './watchdog/health-endpoint';
export type { ... | 1 | 1 | 1 | [{"id": "G0", "claim": "The redaction patterns only match api_key and api-key, so text like `api key: sk-...` (label with a space) passes through unredacted and secrets can be persisted into snapshot memo fields written to disk.", "category": "security", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.